Skip to contentSkip to conversation

usb: remove unnecessary CONFIG_PM dependency from USB_OTG

PATCH Superseded Nathan Sullivan 2 participants 3 messages Oct 5, 2015 USB

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: remove unnecessary CONFIG_PM dependency from USB_OTG

From: Ben Shelton <[email protected]>

The USB gadget support currently depends on power management (CONFIG_PM) being enabled, but does not actually need it enabled. Remove this dependency.

Tested on Bay Trail hardware with dwc3 USB.

---
 drivers/usb/core/Kconfig |    1 -
 1 file changed, 1 deletion(-)
drivers/usb/core/Kconfig +0 -1
index a99c89e..9c5cdf3 100644
@@ -43,7 +43,6 @@ config USB_DYNAMIC_MINORS
 
 config USB_OTG
 	bool "OTG support"
-	depends on PM
 	default n
 	help
 	  The most notable feature of USB OTG is support for a
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 18 lines · Nathan Sullivan

From: Ben Shelton <[email protected]>

The USB gadget support currently depends on power management (CONFIG_PM) being enabled, but does not actually need it enabled. Remove this dependency.

Tested on Bay Trail hardware with dwc3 USB.

---
 drivers/usb/core/Kconfig |    1 -
 1 file changed, 1 deletion(-)
drivers/usb/core/Kconfig +0 -0
index a99c89e..9c5cdf3 100644

drivers/usb/core/Kconfig config USB_DYNAMIC_MINORS · line 46

Quoted 4 lines
drivers/usb/core/Kconfig +0 -1
@@ -43,7 +43,6 @@ config USB_DYNAMIC_MINORS
 
 config USB_OTG
 	bool "OTG support"
-	depends on PM

IIRC we had this dependency because OTG needs support USB bus suspend and afaict, that's only available on PM builds

Signature · 1 line
balbi
#2 lore raw
Quoted 6 lines · Felipe Balbi

IIRC we had this dependency because OTG needs support USB bus suspend and afaict, that's only available on PM builds

Signature · 1 line
balbi

Hmm, our use case is separate device and host controllers on a Bay Trail system. We don't ever need to suspend the bus, since the roles are fixed. Also, the system is running RT tasks and we don't want PM on.

Maybe the device-side USB option should be separate from the OTG option? We really don't want HNP or any of the dual-role features, just support for gadget drivers and USB device controllers.