Skip to contentSkip to conversation

usb: phy: Fix Kconfig dependency for Phy drivers

PATCH In review Alexandre Pereira da Silva 3 participants 4 messages Jun 26, 2012 – Jul 2, 2012 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: phy: Fix Kconfig dependency for Phy drivers

USB phy layer driver are only built if usb host is selected, but they are used too by USB_GADGET drivers

---
 drivers/usb/Makefile    |    2 +-
 drivers/usb/phy/Kconfig |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/Makefile +1 -1
index c691eea..f5ed3d7 100644
@@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK)	+= image/
 obj-$(CONFIG_USB_SERIAL)	+= serial/
 
 obj-$(CONFIG_USB)		+= misc/
-obj-$(CONFIG_USB)		+= phy/
+obj-$(CONFIG_USB_COMMON)	+= phy/
 obj-$(CONFIG_EARLY_PRINTK_DBGP)	+= early/
 
 obj-$(CONFIG_USB_ATM)		+= atm/
drivers/usb/phy/Kconfig +2 -2
index 3cfabcb..e7cf84f 100644
@@ -2,11 +2,11 @@
 # Physical Layer USB driver configuration
 #
 comment "USB Physical Layer drivers"
-	depends on USB
+	depends on USB || USB_GADGET
 
 config USB_ISP1301
 	tristate "NXP ISP1301 USB transceiver support"
-	depends on USB
+	depends on USB || USB_GADGET
 	depends on I2C
 	help
 	  Say Y here to add support for the NXP ISP1301 USB transceiver driver.
Signature · 1 line
1.7.10
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alexandre Pereira da Silva

USB phy layer driver are only built if usb host is selected, but they are used too by USB_GADGET drivers

Quoted 36 lines
---
 drivers/usb/Makefile    |    2 +-
 drivers/usb/phy/Kconfig |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/Makefile +1 -1
index c691eea..f5ed3d7 100644
@@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK)	+= image/
 obj-$(CONFIG_USB_SERIAL)	+= serial/
 
 obj-$(CONFIG_USB)		+= misc/
-obj-$(CONFIG_USB)		+= phy/
+obj-$(CONFIG_USB_COMMON)	+= phy/
 obj-$(CONFIG_EARLY_PRINTK_DBGP)	+= early/
 
 obj-$(CONFIG_USB_ATM)		+= atm/
drivers/usb/phy/Kconfig +2 -2
index 3cfabcb..e7cf84f 100644
@@ -2,11 +2,11 @@
 # Physical Layer USB driver configuration
 #
 comment "USB Physical Layer drivers"
-	depends on USB
+	depends on USB || USB_GADGET
 
 config USB_ISP1301
 	tristate "NXP ISP1301 USB transceiver support"
-	depends on USB
+	depends on USB || USB_GADGET
 	depends on I2C
 	help
 	  Say Y here to add support for the NXP ISP1301 USB transceiver driver.
#2 lore raw
In reply to Alexandre Pereira da Silva

Hi,

Quoted 14 lines · Alexandre Pereira da Silva

USB phy layer driver are only built if usb host is selected, but they are used too by USB_GADGET drivers

---
 drivers/usb/Makefile    |    2 +-
 drivers/usb/phy/Kconfig |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/Makefile +0 -0
index c691eea..f5ed3d7 100644

drivers/usb/Makefile obj-$(CONFIG_USB_MICROTEK) += image/ · line 49

Quoted 5 lines
drivers/usb/Makefile +1 -1
@@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK)	+= image/
 obj-$(CONFIG_USB_SERIAL)	+= serial/
 
 obj-$(CONFIG_USB)		+= misc/
-obj-$(CONFIG_USB)		+= phy/
+obj-$(CONFIG_USB_COMMON)	+= phy/

I'm not sure this is the best solution. Should we introduce CONFIG_USB_PHY for this ?

Signature · 1 line
balbi
#3 lore raw
Quoted 19 lines · Felipe Balbi

Hi,

Quoted 16 lines · Alexandre Pereira da Silva

USB phy layer driver are only built if usb host is selected, but they are used too by USB_GADGET drivers

---
 drivers/usb/Makefile    |    2 +-
 drivers/usb/phy/Kconfig |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/Makefile +0 -0
index c691eea..f5ed3d7 100644
@@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK)  += image/
 obj-$(CONFIG_USB_SERIAL)     += serial/
 
Quoted 6 lines

drivers/usb/Makefile obj-$(CONFIG_USB_MICROTEK) += image/ · line 49

Quoted 3 lines
drivers/usb/Makefile +1 -1
 obj-$(CONFIG_USB)            += misc/
-obj-$(CONFIG_USB)            += phy/
+obj-$(CONFIG_USB_COMMON)     += phy/

I'm not sure this is the best solution. Should we introduce CONFIG_USB_PHY for this ?

In my opinion, the right solution is to move the ISP1301 to the otg dir, where it belongs and merge the duplicated code from lpc32xx_udc and ohxi-nxp to it.

I suggest to leave this as is for now, as it's preventing the driver to build in some configurations. Later, we can try to move this to the right place.