extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
authorArnd Bergmann <arnd@arndb.de>
Wed, 22 Mar 2023 11:16:51 +0000 (12:16 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 29 May 2023 14:41:07 +0000 (23:41 +0900)
commit65acf9c6539b1bf082bc593a9517ef718335d8aa
treeb89c79d8d1bcd12cbf38517bce3878a34152914f
parentdf101446a402bb1bc164f3445d2f028a1dbec6ac
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>
drivers/extcon/Kconfig