Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency

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 <arnd@arndb.de>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Arnd Bergmann and committed by
Chanwoo Choi
65acf9c6 df101446

+1
+1
drivers/extcon/Kconfig
··· 185 185 tristate "TI TUSB320 USB-C extcon support" 186 186 depends on I2C && TYPEC 187 187 select REGMAP_I2C 188 + depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 188 189 help 189 190 Say Y here to enable support for USB Type C cable detection extcon 190 191 support using a TUSB320.