Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp951574pxb; Fri, 22 Apr 2022 15:10:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd+4sgIbNMe4ij4qoY8PQNOoiscvqA3glntpw4fiqecuarxzgs8d5UBGgOPh+KeMzXbJby X-Received: by 2002:a63:4d4c:0:b0:39d:3808:804f with SMTP id n12-20020a634d4c000000b0039d3808804fmr5666110pgl.312.1650665404213; Fri, 22 Apr 2022 15:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650665404; cv=none; d=google.com; s=arc-20160816; b=ggeKNJEehouv5IelyVzG8b+SteR8YRo0yvBldmbxHxqqf92q+5IumTbd7DdWudabKU 58dXBk8MZ/u58pG8njDob1SjczZv6XOAePc80Ff0ko3tHiRDkwvbHOX3wE/4u2nNcd+R OQ9s6d8/De2MjHoGk32/uvi9g1HzJO9E+h6PDnUvOtb8JnwGlACmZWvRuHkgD6Q9RFqM 2a07uPqwjWYBsKI844PTN0qFUrWcbp1mJGzvFqo+jjcPRNaYteelGdItDIZxrk4AYGRo /K9NCHA9o1ENRwdTxV2m9dGMOthIOJS65jK99CFOfVD3CgGGfWZgdunHQb80A5Y4QXqO hUfg== 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 :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=VwiaZVR813YGjjgKOdtZfoG4pK8dgIwdFfTQc9nmb3k=; b=h9mRZ0BX6gDucDwtCMy1LCzlHcd1QS6QHEkDB2K7T5A1rmywyUxXqxoANrCF6bok3l YIZT5uqtbJxo244i4YYOyaMdU3m4LQ0dUmKUXu/hTUn1ntPv5EXnvcge1NWj3Qvpgbwn fxPus5WiYMBDWEI66KOFB0I90vY7mJ3FJjZYvleXtGIlN/r4fVoO8mO7xhB2nk8dxHL2 Su/eurc30hQMz491Tnhx3mHghzWp2agDyheIrXqf9LOjGSi/V24KxYoon2VR7U/Dp2tm mP8r74uDZPO07WRDFYyYELOFOdR2gGdq8VppALc8eNMdvV12Dm/33kzbZ+Wv2K7127tX OuhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o6-20020a170902d4c600b001567d82c09asi10546054plg.174.2022.04.22.15.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:10:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 666A928934B; Fri, 22 Apr 2022 13:16:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379934AbiDUAtb (ORCPT + 99 others); Wed, 20 Apr 2022 20:49:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347647AbiDUAta (ORCPT ); Wed, 20 Apr 2022 20:49:30 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B09E218E; Wed, 20 Apr 2022 17:46:41 -0700 (PDT) Received: from dggpeml500025.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KkJdx6jkYzCrbY; Thu, 21 Apr 2022 08:42:13 +0800 (CST) Received: from dggpeml500008.china.huawei.com (7.185.36.147) by dggpeml500025.china.huawei.com (7.185.36.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 21 Apr 2022 08:46:39 +0800 Received: from [127.0.0.1] (10.67.111.83) by dggpeml500008.china.huawei.com (7.185.36.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 21 Apr 2022 08:46:39 +0800 Message-ID: <90205fce-05aa-c8d5-4e39-9529194723aa@huawei.com> Date: Thu, 21 Apr 2022 08:46:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH -next] usb: typec: rt1719: Fix build error without CONFIG_POWER_SUPPLY To: , , CC: , References: <20220418082425.41566-1-renzhijie2@huawei.com> From: Ren Zhijie In-Reply-To: <20220418082425.41566-1-renzhijie2@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.111.83] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500008.china.huawei.com (7.185.36.147) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 ping... 在 2022/4/18 16:24, Ren Zhijie 写道: > Building without CONFIG_POWER_SUPPLY will fail: > > drivers/usb/typec/rt1719.o: In function `rt1719_psy_set_property': > rt1719.c:(.text+0x10a): undefined reference to `power_supply_get_drvdata' > drivers/usb/typec/rt1719.o: In function `rt1719_psy_get_property': > rt1719.c:(.text+0x2c8): undefined reference to `power_supply_get_drvdata' > drivers/usb/typec/rt1719.o: In function `devm_rt1719_psy_register': > rt1719.c:(.text+0x3e9): undefined reference to `devm_power_supply_register' > drivers/usb/typec/rt1719.o: In function `rt1719_irq_handler': > rt1719.c:(.text+0xf9f): undefined reference to `power_supply_changed' > drivers/usb/typec/rt1719.o: In function `rt1719_update_pwr_opmode.part.9': > rt1719.c:(.text+0x657): undefined reference to `power_supply_changed' > drivers/usb/typec/rt1719.o: In function `rt1719_attach': > rt1719.c:(.text+0x83e): undefined reference to `power_supply_changed' > > Add POWER_SUPPLY dependency to Kconfig. > > Reported-by: Hulk Robot > Fixes: 25d29b980912 ("usb: typec: rt1719: Add support for Richtek RT1719") > Signed-off-by: Ren Zhijie > --- > drivers/usb/typec/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig > index 8f921213b17d..ba24847fb245 100644 > --- a/drivers/usb/typec/Kconfig > +++ b/drivers/usb/typec/Kconfig > @@ -56,6 +56,7 @@ config TYPEC_RT1719 > tristate "Richtek RT1719 Sink Only Type-C controller driver" > depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH > depends on I2C > + depends on POWER_SUPPLY > select REGMAP_I2C > help > Say Y or M here if your system has Richtek RT1719 sink only