Received: by 2002:ac8:71d8:0:b0:40f:fb00:664b with SMTP id i24csp209527qtp; Fri, 4 Aug 2023 08:39:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHwn446JgNgzKw8D0axwKcgBvxYPQ10Ckf+RPMigsbXM8ssTdgiNKJgWl5T44MUN3qdwoG X-Received: by 2002:a17:907:774b:b0:994:8e9:67fe with SMTP id kx11-20020a170907774b00b0099408e967femr1724447ejc.35.1691163581616; Fri, 04 Aug 2023 08:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691163581; cv=none; d=google.com; s=arc-20160816; b=d3XbwpD2YBOpOxuH8yCjhSErRLaMdJZP1zQq1idXLahqQpHdnVmxM7WKD4Agdqxte6 eD3KQzPQ2f6iv5grrZFnMrCekP8M9bxk7RTHPwWq/fDaR5DJ1cKlLE6jmHj4BYaeBFPh 1YlLsKipVNq8JieTsBslP1iozKiiNcRcfJr/KQn0SjXfU2AuzBYz8o91lX5q6KVV/tFl B0UQSliXenLzFB55smNXwPD8qYPp17wgfzW6H0vgQ7PIQ4S0i34v+nmNCnZFKGB2B82/ jSYQe2ix59fXLYJB0c2yc5ejYLLDsEYqi8UXxaDVA/sRvFltsu+yKVdasRIu/3ditFlP akAA== 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:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xAvTWqAeXBrkQJC92t5R4tpJzEn0Uk1niwpeCxuucnk=; fh=6QbbaFI5kbGfeLcBb1d1lKH7miduknho0C2KXFNGICw=; b=EDT+03red5rkTg17p0zgnEmkL9HTyKgE+UOR5EhvqECyGEJCUcPYj/2iOequvThzMp Nxbmm+naH72E7WwQCDhR60V6J2/WJtw0CCo49OW8dDps3NYZ70qs9Wvhuod7fAXoMQmB 8goTI9aCYE7SgqvzSGJZ37RaCdQ69Tnd+Y97PxmNinSx0kSsiFuXq0u3GTEq1r8N629j BB5VlTQ1XcZw3/Z+i1T30p+SRZcCF4SVLcMXMOXk0HJdqYJ0WpXTpmb7oAqS4nnJLsio lBioXgrgHUPKVrLF4JaylcR6Ga+5UmrfWHxfHOvq+f1Ej3TRAWd2ii4dFAIY2WKvyvJG GyfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X4AmpPI2; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x9-20020a1709060a4900b00992d0de8760si1881401ejf.911.2023.08.04.08.39.15; Fri, 04 Aug 2023 08:39:41 -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=@redhat.com header.s=mimecast20190719 header.b=X4AmpPI2; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229978AbjHDOnC (ORCPT + 99 others); Fri, 4 Aug 2023 10:43:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjHDOnB (ORCPT ); Fri, 4 Aug 2023 10:43:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD0DF46B2 for ; Fri, 4 Aug 2023 07:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691160134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xAvTWqAeXBrkQJC92t5R4tpJzEn0Uk1niwpeCxuucnk=; b=X4AmpPI2HPbHAKMVpGNTLF2eGvs6MpnU/6oaui9XM/n5xvQy6V+UaXwo4vACw7JR+0mRKV +ScyNeSEge7wlVPziqBhG7AFsIwWRtyKMe1QeXn5t+qc51HpMXDT9BztpMzlrCgVhoSg2k 41I+xIB4JTlAqezRRCWwTnFyWMpsrIg= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-442-Obz10uoAO0KBZ9z4X7wzCg-1; Fri, 04 Aug 2023 10:42:12 -0400 X-MC-Unique: Obz10uoAO0KBZ9z4X7wzCg-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2b9e9a85a42so24969861fa.3 for ; Fri, 04 Aug 2023 07:42:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691160131; x=1691764931; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xAvTWqAeXBrkQJC92t5R4tpJzEn0Uk1niwpeCxuucnk=; b=OWSr92fbBrzXNiFcIezWgcg6wiOPULsjzBv+3VCxdnd9dxTlYBOW2K6+9jy6FwOLEr BVkXXA1ojPtYzGxQdQn86Pph6BeHaUj/W6BgAI8WJFVWwb5i0UzgYSA9YqCOMzsX5jiW 3TUsf9c1qOHNvxEzoL0q9/7WGkE+/g9XyIVGhRc1NJoZUHGGj5nSssIahFTc7iSzm6VX CmbtXK3FeLZFVsjU7G9dyN6DmVypbXM8rr+2DFIa5j2L1zesSqwUEQL1T7yqcKQsTivt fEglfOaFSdaxtsZRC7uXKuImBLX6tIf1bJ+5tdVxJP+ljTwGqNUtjSDpO4lU637JbBOl OBSQ== X-Gm-Message-State: AOJu0Yx+t+RAad3MSlhm7S+oyemZDFIgFMy1fT/59SCfxT0xhb7cXy2g /rlOk9+III4/GHDrS2Yb9xYWklpAXjRqcdg3wVKu/lIRWbRB1BornFsGF9pYaYXF/m8rqALoOO0 a9Ho+OVHbtIx+b36ZoCrRQ0Su X-Received: by 2002:a05:651c:103c:b0:2b9:f27f:e491 with SMTP id w28-20020a05651c103c00b002b9f27fe491mr1622306ljm.42.1691160131490; Fri, 04 Aug 2023 07:42:11 -0700 (PDT) X-Received: by 2002:a05:651c:103c:b0:2b9:f27f:e491 with SMTP id w28-20020a05651c103c00b002b9f27fe491mr1622287ljm.42.1691160131151; Fri, 04 Aug 2023 07:42:11 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id u19-20020a170906125300b0099251a40184sm1396560eja.99.2023.08.04.07.42.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Aug 2023 07:42:10 -0700 (PDT) Message-ID: Date: Fri, 4 Aug 2023 16:42:09 +0200 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 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> Content-Language: en-US, nl From: Hans de Goede 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=-2.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_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 Hi, On 8/4/23 15: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 Thanks, patch looks good to me: Reviewed-by: Hans de Goede Regards, Hans > --- > 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