From 65acf9c6539b1bf082bc593a9517ef718335d8aa Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 22 Mar 2023 12:16:51 +0100 Subject: extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: df101446a402 ("extcon: usbc-tusb320: add usb_role_switch support") Signed-off-by: Arnd Bergmann Reviewed-by: Alvin Šipraga Signed-off-by: Chanwoo Choi --- drivers/extcon/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/extcon') 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. -- cgit v1.2.3