diff options
author | Roger Quadros <rogerq@ti.com> | 2013-06-14 05:51:41 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-07-29 06:57:05 -0400 |
commit | 052a11d13bdecb77ee4cdbdccfce5434a12209af (patch) | |
tree | 1c56fefad8c2b4542ac50caf2f18ef41a3136ac5 | |
parent | 7c81290e87bf01b507deabf0f478e051367cb416 (diff) |
usb: phy: make PHY driver selection possible by controller drivers
Convert PHY Drivers from menuconfig to menu so that the PHY drivers
can be explicitely selected by the controller drivers.
USB_PHY is no longer a user visible option. It is upto to the PHY
drivers to select it if needed. This patch does so for the existing
PHY drivers that use the USB_PHY library.
Doing so moves the USB_PHY and PHY driver selection problem from the
end user to the PHY and controller driver developer.
e.g.
Earlier, a controller driver (e.g. EHCI_OMAP) that needs to select
a PHY driver (e.g. NOP_PHY) couldn't do so because the PHY driver
depended on USB_PHY. Making the controller driver depend on USB_PHY
has a negative effect i.e. it becomes invisible to the user till
USB_PHY is enabled. Most end users will not familiar with this.
With this patch, the end user just needs to select the controller driver
needed for his/her platform without worrying about which PHY driver to
select.
Also update USB_EHCI_MSM, USB_LPC32XX and USB_OMAP to not depend
on USB_PHY any more. They can safely select the necessary PHY drivers.
[ balbi@ti.com : refreshed on top of my next branch. Changed bool
followed by default n into def_bool n ]
CC: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/Makefile | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/host/Kconfig | 1 | ||||
-rw-r--r-- | drivers/usb/phy/Kconfig | 36 |
4 files changed, 21 insertions, 20 deletions
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 238c5d47cadb..2b3132ede23a 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile | |||
@@ -45,7 +45,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/ | |||
45 | obj-$(CONFIG_USB_SERIAL) += serial/ | 45 | obj-$(CONFIG_USB_SERIAL) += serial/ |
46 | 46 | ||
47 | obj-$(CONFIG_USB) += misc/ | 47 | obj-$(CONFIG_USB) += misc/ |
48 | obj-$(CONFIG_USB_PHY) += phy/ | 48 | obj-$(CONFIG_USB_SUPPORT) += phy/ |
49 | obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/ | 49 | obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/ |
50 | 50 | ||
51 | obj-$(CONFIG_USB_ATM) += atm/ | 51 | obj-$(CONFIG_USB_ATM) += atm/ |
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 08dab3c640fd..1e3f52574367 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -144,7 +144,6 @@ config USB_AT91 | |||
144 | config USB_LPC32XX | 144 | config USB_LPC32XX |
145 | tristate "LPC32XX USB Peripheral Controller" | 145 | tristate "LPC32XX USB Peripheral Controller" |
146 | depends on ARCH_LPC32XX | 146 | depends on ARCH_LPC32XX |
147 | depends on USB_PHY | ||
148 | select USB_ISP1301 | 147 | select USB_ISP1301 |
149 | help | 148 | help |
150 | This option selects the USB device controller in the LPC32xx SoC. | 149 | This option selects the USB device controller in the LPC32xx SoC. |
@@ -206,7 +205,6 @@ config USB_FOTG210_UDC | |||
206 | config USB_OMAP | 205 | config USB_OMAP |
207 | tristate "OMAP USB Device Controller" | 206 | tristate "OMAP USB Device Controller" |
208 | depends on ARCH_OMAP1 | 207 | depends on ARCH_OMAP1 |
209 | depends on USB_PHY | ||
210 | select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG | 208 | select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG |
211 | help | 209 | help |
212 | Many Texas Instruments OMAP processors have flexible full | 210 | Many Texas Instruments OMAP processors have flexible full |
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 4263d011392c..3102b522ca02 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -186,7 +186,6 @@ config USB_EHCI_HCD_AT91 | |||
186 | config USB_EHCI_MSM | 186 | config USB_EHCI_MSM |
187 | tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" | 187 | tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" |
188 | depends on ARCH_MSM | 188 | depends on ARCH_MSM |
189 | depends on USB_PHY | ||
190 | select USB_EHCI_ROOT_HUB_TT | 189 | select USB_EHCI_ROOT_HUB_TT |
191 | select USB_MSM_OTG | 190 | select USB_MSM_OTG |
192 | ---help--- | 191 | ---help--- |
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 3622fff8b798..f5ea339ec155 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig | |||
@@ -1,22 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Physical Layer USB driver configuration | 2 | # Physical Layer USB driver configuration |
3 | # | 3 | # |
4 | menuconfig USB_PHY | 4 | menu "USB Physical Layer drivers" |
5 | bool "USB Physical Layer drivers" | ||
6 | help | ||
7 | Most USB controllers have the physical layer signalling part | ||
8 | (commonly called a PHY) built in. However, dual-role devices | ||
9 | (a.k.a. USB on-the-go) which support being USB master or slave | ||
10 | with the same connector often use an external PHY. | ||
11 | |||
12 | The drivers in this submenu add support for such PHY devices. | ||
13 | They are not needed for standard master-only (or the vast | ||
14 | majority of slave-only) USB interfaces. | ||
15 | |||
16 | If you're not sure if this applies to you, it probably doesn't; | ||
17 | say N here. | ||
18 | 5 | ||
19 | if USB_PHY | 6 | config USB_PHY |
7 | def_bool n | ||
20 | 8 | ||
21 | # | 9 | # |
22 | # USB Transceiver Drivers | 10 | # USB Transceiver Drivers |
@@ -24,6 +12,7 @@ if USB_PHY | |||
24 | config AB8500_USB | 12 | config AB8500_USB |
25 | tristate "AB8500 USB Transceiver Driver" | 13 | tristate "AB8500 USB Transceiver Driver" |
26 | depends on AB8500_CORE | 14 | depends on AB8500_CORE |
15 | select USB_PHY | ||
27 | help | 16 | help |
28 | Enable this to support the USB OTG transceiver in AB8500 chip. | 17 | Enable this to support the USB OTG transceiver in AB8500 chip. |
29 | This transceiver supports high and full speed devices plus, | 18 | This transceiver supports high and full speed devices plus, |
@@ -33,12 +22,14 @@ config FSL_USB2_OTG | |||
33 | bool "Freescale USB OTG Transceiver Driver" | 22 | bool "Freescale USB OTG Transceiver Driver" |
34 | depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME | 23 | depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME |
35 | select USB_OTG | 24 | select USB_OTG |
25 | select USB_PHY | ||
36 | help | 26 | help |
37 | Enable this to support Freescale USB OTG transceiver. | 27 | Enable this to support Freescale USB OTG transceiver. |
38 | 28 | ||
39 | config ISP1301_OMAP | 29 | config ISP1301_OMAP |
40 | tristate "Philips ISP1301 with OMAP OTG" | 30 | tristate "Philips ISP1301 with OMAP OTG" |
41 | depends on I2C && ARCH_OMAP_OTG | 31 | depends on I2C && ARCH_OMAP_OTG |
32 | select USB_PHY | ||
42 | help | 33 | help |
43 | If you say yes here you get support for the Philips ISP1301 | 34 | If you say yes here you get support for the Philips ISP1301 |
44 | USB-On-The-Go transceiver working with the OMAP OTG controller. | 35 | USB-On-The-Go transceiver working with the OMAP OTG controller. |
@@ -52,12 +43,14 @@ config ISP1301_OMAP | |||
52 | config MV_U3D_PHY | 43 | config MV_U3D_PHY |
53 | bool "Marvell USB 3.0 PHY controller Driver" | 44 | bool "Marvell USB 3.0 PHY controller Driver" |
54 | depends on CPU_MMP3 | 45 | depends on CPU_MMP3 |
46 | select USB_PHY | ||
55 | help | 47 | help |
56 | Enable this to support Marvell USB 3.0 phy controller for Marvell | 48 | Enable this to support Marvell USB 3.0 phy controller for Marvell |
57 | SoC. | 49 | SoC. |
58 | 50 | ||
59 | config NOP_USB_XCEIV | 51 | config NOP_USB_XCEIV |
60 | tristate "NOP USB Transceiver Driver" | 52 | tristate "NOP USB Transceiver Driver" |
53 | select USB_PHY | ||
61 | help | 54 | help |
62 | This driver is to be used by all the usb transceiver which are either | 55 | This driver is to be used by all the usb transceiver which are either |
63 | built-in with usb ip or which are autonomous and doesn't require any | 56 | built-in with usb ip or which are autonomous and doesn't require any |
@@ -76,6 +69,7 @@ config OMAP_USB2 | |||
76 | tristate "OMAP USB2 PHY Driver" | 69 | tristate "OMAP USB2 PHY Driver" |
77 | depends on ARCH_OMAP2PLUS | 70 | depends on ARCH_OMAP2PLUS |
78 | select OMAP_CONTROL_USB | 71 | select OMAP_CONTROL_USB |
72 | select USB_PHY | ||
79 | help | 73 | help |
80 | Enable this to support the transceiver that is part of SOC. This | 74 | Enable this to support the transceiver that is part of SOC. This |
81 | driver takes care of all the PHY functionality apart from comparator. | 75 | driver takes care of all the PHY functionality apart from comparator. |
@@ -85,6 +79,7 @@ config OMAP_USB2 | |||
85 | config OMAP_USB3 | 79 | config OMAP_USB3 |
86 | tristate "OMAP USB3 PHY Driver" | 80 | tristate "OMAP USB3 PHY Driver" |
87 | select OMAP_CONTROL_USB | 81 | select OMAP_CONTROL_USB |
82 | select USB_PHY | ||
88 | help | 83 | help |
89 | Enable this to support the USB3 PHY that is part of SOC. This | 84 | Enable this to support the USB3 PHY that is part of SOC. This |
90 | driver takes care of all the PHY functionality apart from comparator. | 85 | driver takes care of all the PHY functionality apart from comparator. |
@@ -101,6 +96,7 @@ config SAMSUNG_USBPHY | |||
101 | config SAMSUNG_USB2PHY | 96 | config SAMSUNG_USB2PHY |
102 | tristate "Samsung USB 2.0 PHY controller Driver" | 97 | tristate "Samsung USB 2.0 PHY controller Driver" |
103 | select SAMSUNG_USBPHY | 98 | select SAMSUNG_USBPHY |
99 | select USB_PHY | ||
104 | help | 100 | help |
105 | Enable this to support Samsung USB 2.0 (High Speed) PHY controller | 101 | Enable this to support Samsung USB 2.0 (High Speed) PHY controller |
106 | driver for Samsung SoCs. | 102 | driver for Samsung SoCs. |
@@ -108,6 +104,7 @@ config SAMSUNG_USB2PHY | |||
108 | config SAMSUNG_USB3PHY | 104 | config SAMSUNG_USB3PHY |
109 | tristate "Samsung USB 3.0 PHY controller Driver" | 105 | tristate "Samsung USB 3.0 PHY controller Driver" |
110 | select SAMSUNG_USBPHY | 106 | select SAMSUNG_USBPHY |
107 | select USB_PHY | ||
111 | help | 108 | help |
112 | Enable this to support Samsung USB 3.0 (Super Speed) phy controller | 109 | Enable this to support Samsung USB 3.0 (Super Speed) phy controller |
113 | for samsung SoCs. | 110 | for samsung SoCs. |
@@ -115,6 +112,7 @@ config SAMSUNG_USB3PHY | |||
115 | config TWL4030_USB | 112 | config TWL4030_USB |
116 | tristate "TWL4030 USB Transceiver Driver" | 113 | tristate "TWL4030 USB Transceiver Driver" |
117 | depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS | 114 | depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS |
115 | select USB_PHY | ||
118 | help | 116 | help |
119 | Enable this to support the USB OTG transceiver on TWL4030 | 117 | Enable this to support the USB OTG transceiver on TWL4030 |
120 | family chips (including the TWL5030 and TPS659x0 devices). | 118 | family chips (including the TWL5030 and TPS659x0 devices). |
@@ -135,6 +133,7 @@ config TWL6030_USB | |||
135 | config USB_GPIO_VBUS | 133 | config USB_GPIO_VBUS |
136 | tristate "GPIO based peripheral-only VBUS sensing 'transceiver'" | 134 | tristate "GPIO based peripheral-only VBUS sensing 'transceiver'" |
137 | depends on GPIOLIB | 135 | depends on GPIOLIB |
136 | select USB_PHY | ||
138 | help | 137 | help |
139 | Provides simple GPIO VBUS sensing for controllers with an | 138 | Provides simple GPIO VBUS sensing for controllers with an |
140 | internal transceiver via the usb_phy interface, and | 139 | internal transceiver via the usb_phy interface, and |
@@ -145,6 +144,7 @@ config USB_ISP1301 | |||
145 | tristate "NXP ISP1301 USB transceiver support" | 144 | tristate "NXP ISP1301 USB transceiver support" |
146 | depends on USB || USB_GADGET | 145 | depends on USB || USB_GADGET |
147 | depends on I2C | 146 | depends on I2C |
147 | select USB_PHY | ||
148 | help | 148 | help |
149 | Say Y here to add support for the NXP ISP1301 USB transceiver driver. | 149 | Say Y here to add support for the NXP ISP1301 USB transceiver driver. |
150 | This chip is typically used as USB transceiver for USB host, gadget | 150 | This chip is typically used as USB transceiver for USB host, gadget |
@@ -156,6 +156,7 @@ config USB_ISP1301 | |||
156 | config USB_MSM_OTG | 156 | config USB_MSM_OTG |
157 | tristate "OTG support for Qualcomm on-chip USB controller" | 157 | tristate "OTG support for Qualcomm on-chip USB controller" |
158 | depends on (USB || USB_GADGET) && ARCH_MSM | 158 | depends on (USB || USB_GADGET) && ARCH_MSM |
159 | select USB_PHY | ||
159 | help | 160 | help |
160 | Enable this to support the USB OTG transceiver on MSM chips. It | 161 | Enable this to support the USB OTG transceiver on MSM chips. It |
161 | handles PHY initialization, clock management, and workarounds | 162 | handles PHY initialization, clock management, and workarounds |
@@ -169,6 +170,7 @@ config USB_MV_OTG | |||
169 | tristate "Marvell USB OTG support" | 170 | tristate "Marvell USB OTG support" |
170 | depends on USB_EHCI_MV && USB_MV_UDC && PM_RUNTIME | 171 | depends on USB_EHCI_MV && USB_MV_UDC && PM_RUNTIME |
171 | select USB_OTG | 172 | select USB_OTG |
173 | select USB_PHY | ||
172 | help | 174 | help |
173 | Say Y here if you want to build Marvell USB OTG transciever | 175 | Say Y here if you want to build Marvell USB OTG transciever |
174 | driver in kernel (including PXA and MMP series). This driver | 176 | driver in kernel (including PXA and MMP series). This driver |
@@ -180,6 +182,7 @@ config USB_MXS_PHY | |||
180 | tristate "Freescale MXS USB PHY support" | 182 | tristate "Freescale MXS USB PHY support" |
181 | depends on ARCH_MXC || ARCH_MXS | 183 | depends on ARCH_MXC || ARCH_MXS |
182 | select STMP_DEVICE | 184 | select STMP_DEVICE |
185 | select USB_PHY | ||
183 | help | 186 | help |
184 | Enable this to support the Freescale MXS USB PHY. | 187 | Enable this to support the Freescale MXS USB PHY. |
185 | 188 | ||
@@ -188,6 +191,7 @@ config USB_MXS_PHY | |||
188 | config USB_RCAR_PHY | 191 | config USB_RCAR_PHY |
189 | tristate "Renesas R-Car USB PHY support" | 192 | tristate "Renesas R-Car USB PHY support" |
190 | depends on USB || USB_GADGET | 193 | depends on USB || USB_GADGET |
194 | select USB_PHY | ||
191 | help | 195 | help |
192 | Say Y here to add support for the Renesas R-Car USB common PHY driver. | 196 | Say Y here to add support for the Renesas R-Car USB common PHY driver. |
193 | This chip is typically used as USB PHY for USB host, gadget. | 197 | This chip is typically used as USB PHY for USB host, gadget. |
@@ -210,4 +214,4 @@ config USB_ULPI_VIEWPORT | |||
210 | Provides read/write operations to the ULPI phy register set for | 214 | Provides read/write operations to the ULPI phy register set for |
211 | controllers with a viewport register (e.g. Chipidea/ARC controllers). | 215 | controllers with a viewport register (e.g. Chipidea/ARC controllers). |
212 | 216 | ||
213 | endif # USB_PHY | 217 | endmenu |