Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3067834pxb; Mon, 18 Apr 2022 15:02:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4nm72rWUqzEbgTv3fevr0GQVYttpXtL6ByZF+LGgoQ3SWAx+S4/jN6ON4BDLpuQ6Nlqps X-Received: by 2002:a63:d64d:0:b0:374:6edc:989c with SMTP id d13-20020a63d64d000000b003746edc989cmr11861030pgj.434.1650319369352; Mon, 18 Apr 2022 15:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650319369; cv=none; d=google.com; s=arc-20160816; b=cQV+jK6EfBOEVqZvAREWk5iajPkQ/gCeH/TDy/SqTOjw/gEDRmYNOLdkOutkXQjKad w38EXk6o0FsR5UkiK4TrqYVDs+y+huqwkw4U32A+Y/zC1BRJviaXA7Yy6+e3bS2A94aA u/ft1qIL17HqocRNias98bKiI5Kycxf7zt3YsXZ+fnig/PzfF0sY4hPXWMd1WIlRPuwG ctZce2R02+LokqUZmvegb4p8ZquO/fSLV3SZDPyfC3Cj+wp2quMXIrokg1o0BUVw/BT5 YJKe10oDcslG0BcuVkG62SXCX9ZUxEHJcoIo2cvF+RiTjsf2+eyIemfxkA/6YWqZEcSc RQ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=y2O/x4qv4tL5mpe6CXxUUbSqefQLcjRq/QqxzybqSCA=; b=rr0AHSnKeVTFiaOeggwZriAxxzAr+bEN+TXF3zImUzcvpAKlVX9RwlinWbx9ty00no yY6bPgTx4sLMrS5evQ68qoqL76DYmB/CU+m2BivCK5OB4otVnpqZbJ30M3MsVkwzttKp 9YXojGzmurm7vywZpyfuKitBfj3he3HG5InZp6wwYKfxAKKAajC604O9/BZZ3U5/IfW9 R2HK4TWGz+YcuZ3rhnAoVCCuUh3UkVqZM5qToxIsMXH0IhE09QFclSMJPwtSWYQhIbUt e5lZDvjBtDX0XfztTvLhpZhFwtue3ZyCtFRda0Cukakpv/PxJEK+65fKxwVMhPA/Z84R rROA== 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 15-20020a63114f000000b003987eaf156csi10220206pgr.641.2022.04.18.15.02.33; Mon, 18 Apr 2022 15:02:49 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237218AbiDRI2S (ORCPT + 99 others); Mon, 18 Apr 2022 04:28:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbiDRI2R (ORCPT ); Mon, 18 Apr 2022 04:28:17 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B87193C8; Mon, 18 Apr 2022 01:25:38 -0700 (PDT) Received: from dggpeml500026.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Khg1802pbzFq2d; Mon, 18 Apr 2022 16:23:08 +0800 (CST) Received: from dggpeml500008.china.huawei.com (7.185.36.147) by dggpeml500026.china.huawei.com (7.185.36.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 18 Apr 2022 16:25:37 +0800 Received: from huawei.com (10.67.175.34) 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; Mon, 18 Apr 2022 16:25:36 +0800 From: Ren Zhijie To: , , CC: , , Ren Zhijie Subject: [PATCH -next] usb: typec: rt1719: Fix build error without CONFIG_POWER_SUPPLY Date: Mon, 18 Apr 2022 16:24:25 +0800 Message-ID: <20220418082425.41566-1-renzhijie2@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.175.34] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500008.china.huawei.com (7.185.36.147) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 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 -- 2.17.1