From patchwork Mon Aug 28 22:42:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 137090 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp3668801vqm; Mon, 28 Aug 2023 18:49:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIW84PniQ2Dq1FS1pFYEj9eVNj8/f/HwsGDdzNlekVEvEfQ0Arjt/8abMhyO4ACiI6DN3F X-Received: by 2002:aa7:ccc9:0:b0:525:7cd4:34da with SMTP id y9-20020aa7ccc9000000b005257cd434damr19396554edt.40.1693273774406; Mon, 28 Aug 2023 18:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693273774; cv=none; d=google.com; s=arc-20160816; b=Rux4GgO9qE3ZzbYlDd4KZ58h4o0MmoH2E4keUomrF7SY8lzbOGcjXldF7ntPl+WoAo fMo2cHJtskbu1WapXme/ssrCXfwoIUh3+svzlA7VCSxS85xA5fuFh9h8fdE6uYfqQY1k Ksllyl39Z4cC4JKI3sJ4vbgB25NAfZmUf7SRfjHb3XG7/1RCVCu19NyFq4CJWTGQ2+P8 If4qLkJeNe41m1JzXiFlveK6PYr4JNsfP3wNhCFUNNh37QC0PY72gtEeKdRTiPQ/FG4Q b6JO1dzNuyqNNxrGHyMbAW56HgpuqC9YDuisokCYbFuuPPh2n8n67kcUXi9Ka/aNxPvn Y6cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4eigGUxrdrCpyRfsWK1n2HYd03nY5w2QFJ6Q65waFT8=; fh=2/KxJP2Eee+Wi6UA9rT1ZHui3yqF8TIbWbqT1xdznDY=; b=rqWnYFjNMHUysWhqJAqrQGHMme5sPXd1y1e9oJc0IVALAW4pyTBlmXR6IPxHjAdnPV JUwjo3/urpa9OQdDxlfjCtdYtYWW2mSCI29sZKOOnlkXu3Sl0MEVO7FcqtdZLcUF+oDI GiPFJ6ab0aoKQc8yB79SfbsWjKi9m0WSPJ9QwvrgjT5j5XdVbDkEwkLvL/F6HwdQ3l/w XdDPzQOor6HDy7BJB4n9SruDNrckglwes9B698kPw611tfCGZkzn8Zg6fHv6Rn6wt9zg XGZKXYxNe/IwGEAwVO4nwT/kRGaMCJnHwy1DNpK4Yj7GXmqvb957bKAOUF5RUEcepW1L s8WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=jgzXEIMZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t18-20020a05640203d200b0052a11cb4b23si5040557edw.688.2023.08.28.18.48.47; Mon, 28 Aug 2023 18:49:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=jgzXEIMZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234033AbjH1Wmq (ORCPT + 99 others); Mon, 28 Aug 2023 18:42:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234199AbjH1WmM (ORCPT ); Mon, 28 Aug 2023 18:42:12 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B465139; Mon, 28 Aug 2023 15:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=4eigGUxrdrCpyRfsWK1n2HYd03nY5w2QFJ6Q65waFT8=; b=jgzXEIMZURpG6S4DHt2vqrnTNM pGlfKDW+1h2m9u6eyNOv8Mk50DZsGdxLF/U3vddCQnXAH70ulEMgROJeDM9mUB0LPehkVMAhnvjlL M3LaOspUTBE26pLxeOOBMR21x5/LhUDVz2NWR2K5ERknMS/z/DFyUitsRFNOpzS+ZUWwy561nqecj E3NH48WTF+oK1m41SAJ7ky1AGc0AovisxACq7YTJPexxpag6sh78mbIAep5cxE1ITV4qK8bGisDAc 7x6xoIBiy+fA3qjgjo3nKHUdIv+QGOWnimvFFl7bvNI9ZwTp9a9mc+i1EzQMXtu/KwISzSM3KjRX/ aitDSMJQ==; Received: from c-71-59-149-187.hsd1.or.comcast.net ([71.59.149.187] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qakvv-00AOCT-2L; Mon, 28 Aug 2023 22:42:07 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jakob Hauser , Sebastian Reichel , Lee Jones , linux-pm@vger.kernel.org Subject: [PATCH] power: supply: rt5033_charger: recognize EXTCON setting Date: Mon, 28 Aug 2023 15:42:01 -0700 Message-ID: <20230828224201.26823-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775526241413381627 X-GMAIL-MSGID: 1775526241413381627 CHARGER_RT5033 should honor the EXTCON setting to prevent these build errors: riscv64-linux-ld: drivers/power/supply/rt5033_charger.o: in function `.L33': rt5033_charger.c:(.text.rt5033_charger_probe+0x578): undefined reference to `extcon_find_edev_by_node' riscv64-linux-ld: drivers/power/supply/rt5033_charger.o: in function `.L0 ': rt5033_charger.c:(.text.rt5033_charger_probe+0x64e): undefined reference to `devm_extcon_register_notifier_all' riscv64-linux-ld: drivers/power/supply/rt5033_charger.o: in function `.L96': rt5033_charger.c:(.text.rt5033_charger_extcon_work+0x32): undefined reference to `extcon_get_state' Fixes: 12cc585f36b8 ("power: supply: rt5033_charger: Add cable detection and USB OTG supply") Signed-off-by: Randy Dunlap Cc: Jakob Hauser Cc: Sebastian Reichel Cc: Lee Jones Cc: linux-pm@vger.kernel.org --- drivers/power/supply/Kconfig | 1 + 1 file changed, 1 insertion(+) diff -- a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig @@ -769,6 +769,7 @@ config BATTERY_RT5033 config CHARGER_RT5033 tristate "RT5033 battery charger support" depends on MFD_RT5033 + depends on EXTCON || !EXTCON help This adds support for battery charger in Richtek RT5033 PMIC. The device supports pre-charge mode, fast charge mode and