extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
PATCH 1/1 extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
From: Arnd Bergmann <[email protected]>
When CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in:
ld.lld: error: undefined symbol: fwnode_usb_role_switch_get
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
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
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
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.
--- drivers/extcon/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/extcon/Kconfig +1 -0
@@ -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.
Signature · 1 line
2.39.2
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in:ld.lld: error: undefined symbol:
fwnode_usb_role_switch_getQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
extcon-usbc-tusb320.c
drivers/extcon/extcon-usbc-tusb320.o:(tusb320_probe) in archive vmlinux.ald.lld: error: undefined symbol:
usb_role_switch_set_roleQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
extcon-usbc-tusb320.c
drivers/extcon/extcon-usbc-tusb320.o:(tusb320_state_update_handler) in archive vmlinux.a
Quoted 7 lines
Add the appropriate
Kconfigdependency to prevent this configuration but still allow the driver to be built-in whenUSB_ROLE_SWITCHis disabled.Fixes 19685ae43489 ("extcon: usbc-tusb320: add usb_role_switch support")Signed-off-by Arnd Bergmann <[email protected]>---
I overlooked this possibility, my bad... Thanks Arnd for fixing!
Chanwoo Choi
AppliedQuoted 26 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When
CONFIG_USB_ROLE_SWITCH=m, tusb320 cannot be built-in:ld.lld: error: undefined symbol:
fwnode_usb_role_switch_getQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
extcon-usbc-tusb320.c
drivers/extcon/extcon-usbc-tusb320.o:(tusb320_probe) in archive vmlinux.ald.lld: error: undefined symbol:
usb_role_switch_set_roleQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
extcon-usbc-tusb320.c
drivers/extcon/extcon-usbc-tusb320.o:(tusb320_state_update_handler) in archive vmlinux.aAdd the appropriate
Kconfigdependency to prevent this configuration but still allow the driver to be built-in whenUSB_ROLE_SWITCHis disabled.Fixes 19685ae43489 ("extcon: usbc-tusb320: add usb_role_switch support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/extcon/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/extcon/Kconfig +0
-0
drivers/extcon/Kconfig config EXTCON_USBC_TUSB320 · line 191
Quoted 7 lines
drivers/extcon/Kconfig +1
-0@@ -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.
Signature · 3 lines
Best Regards, Samsung Electronics Chanwoo Choi