Message ID | 20230322111708.1042312-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2288089wrt; Wed, 22 Mar 2023 04:33:24 -0700 (PDT) X-Google-Smtp-Source: AK7set9jtQcMDdJeQH4vTAXhi4rv631sSxDw58wkslGws+P/nMXEK1RqxFXf3QSvbSl/QDEB5RRL X-Received: by 2002:a17:902:da85:b0:19e:b2f3:e8c4 with SMTP id j5-20020a170902da8500b0019eb2f3e8c4mr3013159plx.25.1679484804563; Wed, 22 Mar 2023 04:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679484804; cv=none; d=google.com; s=arc-20160816; b=GRZilPaFI9nlOcE1/yFpaBjVUiLJfTwicxpK9WNMVYZ8cG0vkWNsy3OrLbJOgEyY9M K34A1elC19oPQdYaakFTohJYgZRkW0BKEbmPSxLos6BuZGowtoF79ApBmmXAfVuigeUN lwXdgXR0OXXHq25rx/7JdqUo1fsbboAn022x0WIGg2DRQguisW7T3beiku5gKd4ilISl DjemCduIH65H1TkkG8I8eEuV14z1sxa84JBIM7b1iNzWKl+3KsvB8DSDL8HznmGuO82F QkXNFN015UZOmkgUJdr3BEgEBwYnFmlbF2/U6wVKEUC0zYbqqEIc4HI9JyU6LAYDnpjZ ZVUg== 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=r2Dbz4G32SF4poM08TwTXMuNh7AYLe25TnYnBhygtr8=; b=i8iIVU2hlAE2MajbpqJkBNP8pzU/CN9HgKoovHh9p//YSB82HGbrs4uErebQ02HHTX VBEhODz0L1e+cuF/OraqjMutwWw514wsCYOLm4FYASThS+0Ucb7gkjgJF4VB+GEyyoLR k3tvmnH1vk1gB/NvqvCAPr3jWvVrWwcCbB4HtUJsZ/Aie9EC44+aPJi3n8gQD+69WTO7 edt/GrgspVe3sHukUFgqxtfNYMFaEkVkFipAHfGvm0KnCPhZF1xn9uASa7UFgsQ5ysGC BxqDJf2wGKmTgYOTs64zg9YspV1d6OhufMa562+libk0ggEJpVSswEn3SK5Xf0cwS/wn RD6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U9KJvy1B; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p17-20020a170902a41100b0019ac13b77efsi15332223plq.158.2023.03.22.04.33.10; Wed, 22 Mar 2023 04:33:24 -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=U9KJvy1B; 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 S230337AbjCVLRQ (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Wed, 22 Mar 2023 07:17:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbjCVLRO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Mar 2023 07:17:14 -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 0A6C534F4B for <linux-kernel@vger.kernel.org>; Wed, 22 Mar 2023 04:17:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9AA666202A for <linux-kernel@vger.kernel.org>; Wed, 22 Mar 2023 11:17:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FE57C433D2; Wed, 22 Mar 2023 11:17:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679483833; bh=hxYlSbdZtdkYUaS/j6XHRDcBiXZlnQz/QqL+Bt8m+2k=; h=From:To:Cc:Subject:Date:From; b=U9KJvy1B/utPReWCd/fUqy5WoB93BhUvGfD8dAas9yAKCatpUlJj99pl89q46pL+V s9KU98lG8Sua9QeBTJ8lEGUsVBix+UrNadcA1tN3149AFk4jBZGv4w5LUpLawfzJe4 joQAuNPobXqSlBgC4gToGn8eRZjypzCfGbFpY3D2KmhH2OzbbT7BH7JavxSEpsnbhY UBAj5aBqajN9H6kZE5nKjo7CFVOR7qbV4dB1PBdaa4Iu0bRezl9MgZTWRdFiTfLzwo +JmXBvPqnLplDn+yEw5p08ejbGaS7d8WD/cBGEX1bIJC8AD2oPAAMPgccX9hLCGCn0 U/QCyMTCuaT8Q== From: Arnd Bergmann <arnd@kernel.org> To: MyungJoo Ham <myungjoo.ham@samsung.com>, Chanwoo Choi <cw00.choi@samsung.com>, =?utf-8?q?Alvin_=C5=A0ipraga?= <alsi@bang-olufsen.dk>, Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org Subject: [PATCH] extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency Date: Wed, 22 Mar 2023 12:16:51 +0100 Message-Id: <20230322111708.1042312-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=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761067458391023272?= X-GMAIL-MSGID: =?utf-8?q?1761067458391023272?= |
Series |
extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
|
|
Commit Message
Arnd Bergmann
March 22, 2023, 11:16 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> When CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in: ld.lld: error: undefined symbol: fwnode_usb_role_switch_get >>> referenced by extcon-usbc-tusb320.c >>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_probe) in archive vmlinux.a ld.lld: error: undefined symbol: usb_role_switch_set_role >>> referenced by extcon-usbc-tusb320.c >>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_state_update_handler) in archive vmlinux.a Add the appropriate Kconfig dependency to prevent this configuration but still allow the driver to be built-in when USB_ROLE_SWITCH is disabled. Fixes: 19685ae43489 ("extcon: usbc-tusb320: add usb_role_switch support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/extcon/Kconfig | 1 + 1 file changed, 1 insertion(+)
Comments
On Wed, Mar 22, 2023 at 12:16:51PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > When CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in: > > ld.lld: error: undefined symbol: fwnode_usb_role_switch_get > >>> referenced by extcon-usbc-tusb320.c > >>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_probe) in archive vmlinux.a > ld.lld: error: undefined symbol: usb_role_switch_set_role > >>> referenced by extcon-usbc-tusb320.c > >>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_state_update_handler) in archive vmlinux.a > > Add the appropriate Kconfig dependency to prevent this > configuration but still allow the driver to be built-in > when USB_ROLE_SWITCH is disabled. > > Fixes: 19685ae43489 ("extcon: usbc-tusb320: add usb_role_switch support") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- I overlooked this possibility, my bad... Thanks Arnd for fixing! Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
On 23. 3. 22. 20:16, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > When CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in: > > ld.lld: error: undefined symbol: fwnode_usb_role_switch_get >>>> referenced by extcon-usbc-tusb320.c >>>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_probe) in archive vmlinux.a > ld.lld: error: undefined symbol: usb_role_switch_set_role >>>> referenced by extcon-usbc-tusb320.c >>>> drivers/extcon/extcon-usbc-tusb320.o:(tusb320_state_update_handler) in archive vmlinux.a > > Add the appropriate Kconfig dependency to prevent this > configuration but still allow the driver to be built-in > when USB_ROLE_SWITCH is disabled. > > Fixes: 19685ae43489 ("extcon: usbc-tusb320: add usb_role_switch support") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/extcon/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig > index 290186e44e6b..0ef1971d22bb 100644 > --- a/drivers/extcon/Kconfig > +++ b/drivers/extcon/Kconfig > @@ -185,6 +185,7 @@ config EXTCON_USBC_TUSB320 > tristate "TI TUSB320 USB-C extcon support" > depends on I2C && TYPEC > select REGMAP_I2C > + depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH > help > Say Y here to enable support for USB Type C cable detection extcon > support using a TUSB320. Applied it. Thanks.
diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig index 290186e44e6b..0ef1971d22bb 100644 --- a/drivers/extcon/Kconfig +++ b/drivers/extcon/Kconfig @@ -185,6 +185,7 @@ config EXTCON_USBC_TUSB320 tristate "TI TUSB320 USB-C extcon support" depends on I2C && TYPEC select REGMAP_I2C + depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH help Say Y here to enable support for USB Type C cable detection extcon support using a TUSB320.