* [PATCH] extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
@ 2023-03-22 11:16 Arnd Bergmann
2023-03-22 13:05 ` Alvin Šipraga
2023-03-23 14:19 ` Chanwoo Choi
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-03-22 11:16 UTC (permalink / raw)
To: MyungJoo Ham, Chanwoo Choi, Alvin Šipraga, Heikki Krogerus
Cc: Arnd Bergmann, linux-kernel
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.
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
2023-03-22 11:16 [PATCH] extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency Arnd Bergmann
@ 2023-03-22 13:05 ` Alvin Šipraga
2023-03-23 14:19 ` Chanwoo Choi
1 sibling, 0 replies; 3+ messages in thread
From: Alvin Šipraga @ 2023-03-22 13:05 UTC (permalink / raw)
To: Arnd Bergmann
Cc: MyungJoo Ham, Chanwoo Choi, Heikki Krogerus, Arnd Bergmann, linux-kernel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency
2023-03-22 11:16 [PATCH] extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency Arnd Bergmann
2023-03-22 13:05 ` Alvin Šipraga
@ 2023-03-23 14:19 ` Chanwoo Choi
1 sibling, 0 replies; 3+ messages in thread
From: Chanwoo Choi @ 2023-03-23 14:19 UTC (permalink / raw)
To: Arnd Bergmann, MyungJoo Ham, Chanwoo Choi, Alvin Šipraga,
Heikki Krogerus
Cc: Arnd Bergmann, linux-kernel
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.
--
Best Regards,
Samsung Electronics
Chanwoo Choi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-23 14:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22 11:16 [PATCH] extcon: usbc-tusb320: add USB_ROLE_SWITCH dependency Arnd Bergmann
2023-03-22 13:05 ` Alvin Šipraga
2023-03-23 14:19 ` Chanwoo Choi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.