Skip to contentSkip to conversation

usb: typec: Ensure USB_ROLE_SWITCH is set as a dependency for tps6598x

PATCH In review Bryan O'Donoghue 2 participants 2 messages May 20, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 usb: typec: Ensure USB_ROLE_SWITCH is set as a dependency for tps6598x

When I switched on USB role switching for the tps6598x I completely forgot to add the Kconfig dependency.

Ensure USB_ROLE_SWITCH is selected to prevent the typs6598x driver being compiled in but the role-switch driver being compiled as a module, leading to link error.

---
 drivers/usb/typec/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/typec/Kconfig +2 -1
index b4f2aac7ae8a..559dd06117e7 100644
@@ -64,7 +64,8 @@ config TYPEC_HD3SS3220
 config TYPEC_TPS6598X
 	tristate "TI TPS6598x USB Power Delivery controller driver"
 	depends on I2C
-	select REGMAP_I2C
+	depends on REGMAP_I2C
+	depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
 	help
 	  Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power
 	  Delivery controller.
Signature · 1 line
2.25.1
maintainer Acked-by on v3 1/1
#1 lore raw
Quoted 9 lines · Bryan O'Donoghue

When I switched on USB role switching for the tps6598x I completely forgot to add the Kconfig dependency.

Ensure USB_ROLE_SWITCH is selected to prevent the typs6598x driver being compiled in but the role-switch driver being compiled as a module, leading to link error.

Quoted 20 lines
---
 drivers/usb/typec/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/typec/Kconfig +2 -1
index b4f2aac7ae8a..559dd06117e7 100644
@@ -64,7 +64,8 @@ config TYPEC_HD3SS3220
 config TYPEC_TPS6598X
 	tristate "TI TPS6598x USB Power Delivery controller driver"
 	depends on I2C
-	select REGMAP_I2C
+	depends on REGMAP_I2C
+	depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
 	help
 	  Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power
 	  Delivery controller.
Signature · 1 line
2.25.1

thanks,

Signature · 1 line
heikki