Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3564706rwo; Fri, 4 Aug 2023 06:53:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFShhCoY15vsCSowax4K9zNrMDlrBnvH1tYimne93A0jYFVjYZWlyj7PTrJMBD2C4tvVMFp X-Received: by 2002:a05:6a20:8e19:b0:135:38b5:7e63 with SMTP id y25-20020a056a208e1900b0013538b57e63mr1675423pzj.46.1691157236197; Fri, 04 Aug 2023 06:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691157236; cv=none; d=google.com; s=arc-20160816; b=o4bL/+fO1SsZevxpZ/BR1qU8NuoRazCYbSDT4pgmpM8p3JdNdobtjxpKJtAhCVftVV YaYkJda1YrmOe6QXqzfobyCYILUy40TwtJw+w6ENZZnDh0gEj2d0pu2YYVT7naZYRPw+ uXR2LkYJeW/gAxyfscfGH7/pmgd3XpGE5gNsOUQ2Bk62vXJ/1rFi55sOCJQlQElK5s7T 5uoF4hls6cx2OUsrCAl6Gw5vRc1vjAYed8OHkku1JMsWiTyXndz/kSHjIuEg/5ZxzoLx VuYAQdmTv+14hKQwDFjj1nFNkZnmyMwULYbN4qvTMGYlCUIAg8BSPJNT9NszbNOAaqOs iiSg== 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=j/BnTW4Sr1RQOWHQXD9vtNLKEIEVoZx9uZOyL6swRjw=; fh=0UsJvjQzRinx/yRrzeEIilbMRiu1DD1Z0JzrjmvaHpc=; b=D2dfxtG6rN4Ss7vyHGMt37ZHPa7kV98vXIh6wgDcxV09QNNP6vC+JkwUUGaQ90fm74 3s0fsC8wvw7waiKWt92CVFyKQCY1agsNBbNZQPkIXkmmr3uudbZFbfdLzoEx2s4+R9G/ 22khYODx2imyCbFe73QnssgLbbSwb2685mCRoHu78QM/gNEAcRIhiwFtV2ePXRXsxeR5 bobW+nXydbcMm1Hum1G+sn8yNdLQW9ERCVTxssCxaNJFdHrJsjmlGzTnRFcMvhC/Ohh7 rffbJlKK48zG2O+L2OqcD4lQyX9bBS96GI4QKPCFBMFWJw7pLWADNgvtr3aEf86i38UR 2/Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DnQnp7U6; 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 3-20020a630b03000000b005646f8a9506si1799606pgl.426.2023.08.04.06.53.41; Fri, 04 Aug 2023 06:53:56 -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=DnQnp7U6; 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 S230099AbjHDN31 (ORCPT + 99 others); Fri, 4 Aug 2023 09:29:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbjHDN3M (ORCPT ); Fri, 4 Aug 2023 09:29:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ECBE4C37 for ; Fri, 4 Aug 2023 06:29:00 -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 2F36B61FCF for ; Fri, 4 Aug 2023 13:28:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E903C433C7; Fri, 4 Aug 2023 13:28:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691155738; bh=lvUDRw4p634vjK9st2933Fwt4UHM/GIodcYQmJQCOqw=; h=From:To:Cc:Subject:Date:From; b=DnQnp7U6H/286DwMyobjb04gICdFk2v9JsJ7V4pAgQpGWPDx6qSP5Cv6LcN/3FXbW H9Do0beaHzK2YbPKdInZkR/rKFw35h0Vh2/sZQ/2jrQ5zQRqoB+BCqT76/se9JxeI9 KXJKilVVabs1sbXa6Qx7hQwFhX7zkGHJ/hIiyg3f/mxtgrEyYJ/IfuEGkWjBoL2wQl XBZgIkXbI8uZhKdzGlzVg3CYgmNkuWK53yIGZkh/nZamOJGc7MmYp6Kzb0SXeJKiUF /taqdYI8q9ihNQq5Lh5mvIBkT98fD0bFpTXKjEItr0vDloo4gJtgupdY8yibuTA6Zc BuQ3x1um89NOQ== From: Arnd Bergmann To: MyungJoo Ham , Chanwoo Choi , Sebastian Reichel , Hans de Goede Cc: Arnd Bergmann , =?UTF-8?q?Alvin=20=C5=A0ipraga?= , Heikki Krogerus , Marek Vasut , linux-kernel@vger.kernel.org Subject: [PATCH] extcon: cht_wc: add POWER_SUPPLY dependency Date: Fri, 4 Aug 2023 15:28:49 +0200 Message-Id: <20230804132853.2300155-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 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 -- 2.39.2