Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp765362rwb; Sat, 5 Aug 2023 00:07:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnL3ExMm/OU+6JGpem3IawyZlfE8Flx9CnUu8CcYGiUjP9E2CuDRCpu49AHzfg7N8XiMbD X-Received: by 2002:a05:6808:10d4:b0:3a7:83a7:ae71 with SMTP id s20-20020a05680810d400b003a783a7ae71mr3090962ois.54.1691219272046; Sat, 05 Aug 2023 00:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691219272; cv=none; d=google.com; s=arc-20160816; b=WAvFIvZy16lMApWqeS3S3wyUGOlQQcttqqganjr7SGjm7sqwGU8NAVYz3UTFbbVqzd QGbF2N7XP3CgfpSx63517IEJiHBRkNy78hB1GAIjo9e6o0uwqzXpSDkl6Gj1LE8gF8US L+Y2faDXM/s1tTXpeKsolVFdoInM9/BY0md7LKSdQ1hTWZqo+IIwFGBmcqGStubG3+ix vmH2c3ocZg9fuvdxzRJqhRlhlkMWsgbsIDOwQtqsK7SkvBppgneEgJ1rLi1XEJl4QJZQ trcJxe9o4H1UU9rZKtnzHj1ochGQkK1xNl4fnI4xDQyi1jAOZZZZnNdg0ktF6na0FU8A 39MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=GBoD/sW3XJE4uHjbMWu2wkJEd7bFV/RdzKZ+AWxpJ+o=; fh=5jxoENGNmf3a7TuxueZ9DjPrvCk4GYb07sxFtnk7HDU=; b=cEtnZanAAXcNrAKUCBbaeP5qjmJt77Ixprv5ZwILDRlFgTY+mbwbYu/J52BflMPcOY EUY28CeHQWGO8WgGeVfrDGbBSd+HRKJ33QvMF7RCIbUhC0s4gXNFg9HNt9yp4OdvU1aG Tor1Vv7pslCYLjyiGc2LeLaEMmfFRlKcUNNQhEVLqvtW+PKIFh3VMNnjNSJqDCPND0Gg NutYwbM88dFR5fBUclgK6kP7g7/fOlrD6UCZw82HLlL8u9OlVZkFeifO/1kZDjr2pdbL g0qSX8Og2Da5HtXsZY2PdWlA2aFVtwjy5dHKnG0HOotI9ZTt+J6eR15fa/g8ezIPh85S q+7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P3YiI+2V; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c37-20020a631c65000000b0055c868268f9si2831515pgm.462.2023.08.05.00.07.40; Sat, 05 Aug 2023 00:07:52 -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=@kernel.org header.s=k20201202 header.b=P3YiI+2V; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229450AbjHEGnD (ORCPT + 99 others); Sat, 5 Aug 2023 02:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbjHEGnA (ORCPT ); Sat, 5 Aug 2023 02:43:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE00D1BE for ; Fri, 4 Aug 2023 23:42:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6F14860A1A for ; Sat, 5 Aug 2023 06:42:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E345C433C7; Sat, 5 Aug 2023 06:42:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691217771; bh=cYmaEUvHLY/7RQQcRtIEJ4CworRRdzVY9ztwu+GARH4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=P3YiI+2VwFeV1qw+P1mlHUC5WUVuuXuN0Nd+D35Z9EqMTRX0CBUIFghsM7m7qgFth OcKUjhAG5++HF+I1PyNGIsZygmw+zQiVjbJFfi/21Jcp3sRBEapuOMxH/lGpJYmLWF /ZjfjjGp/yI8uylSOvSmTr0dWVQe2cJY8Q+CgwGRWg3Cvidm/JzFdJO0Ru077MsB0Q I91WwAVuQ2xSDJ9KEV3KGRacugPsWESA3Cd6dubaNSrKXeOY28CqRAgpAUtXGL3QfX gE+6sBrVazpOQ71het3tITxMzYfXZm+gHUowKQdIYl0ejpIgdItYKjZylOqZj8H+mw R4ct5jWnujaOQ== Message-ID: <9d5fc0d5-9ee9-3268-2b6a-22e870047d2b@kernel.org> Date: Sat, 5 Aug 2023 15:42:48 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] extcon: cht_wc: add POWER_SUPPLY dependency To: Arnd Bergmann , MyungJoo Ham , Chanwoo Choi , Sebastian Reichel , Hans de Goede Cc: Arnd Bergmann , =?UTF-8?Q?Alvin_=c5=a0ipraga?= , Heikki Krogerus , Marek Vasut , linux-kernel@vger.kernel.org References: <20230804132853.2300155-1-arnd@kernel.org> From: Chanwoo Choi Content-Language: en-US In-Reply-To: <20230804132853.2300155-1-arnd@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 On 23. 8. 4. 22:28, Arnd Bergmann wrote: > From: Arnd Bergmann > > The driver fails to link when CONFIG_POWER_SUPPLY is disabled: > > x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_psy_get_prop': > extcon-intel-cht-wc.c:(.text+0x15ccda7): undefined reference to `power_supply_get_drvdata' > x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_pwrsrc_event': > extcon-intel-cht-wc.c:(.text+0x15cd3e9): undefined reference to `power_supply_changed' > x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_probe': > extcon-intel-cht-wc.c:(.text+0x15cd596): undefined reference to `devm_power_supply_register' > > It should be possible to change the driver to not require this at > compile time and still provide other functions, but adding a hard > Kconfig dependency does not seem to have any practical downsides > and is simpler since the option is normally enabled anyway. > > Fixes: 66e31186cd2aa ("extcon: intel-cht-wc: Add support for registering a power_supply class-device") > Signed-off-by: Arnd Bergmann > --- > drivers/extcon/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig > index 0ef1971d22bb0..8de9023c2a387 100644 > --- a/drivers/extcon/Kconfig > +++ b/drivers/extcon/Kconfig > @@ -62,6 +62,7 @@ config EXTCON_INTEL_CHT_WC > tristate "Intel Cherrytrail Whiskey Cove PMIC extcon driver" > depends on INTEL_SOC_PMIC_CHTWC > depends on USB_SUPPORT > + depends on POWER_SUPPLY > select USB_ROLE_SWITCH > help > Say Y here to enable extcon support for charger detection / control Applied it. Thanks. -- Best Regards, Samsung Electronics Chanwoo Choi