diff options
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r-- | drivers/usb/phy/Kconfig | 19 | ||||
-rw-r--r-- | drivers/usb/phy/phy-ab8500-usb.c | 2 | ||||
-rw-r--r-- | drivers/usb/phy/phy-fsl-usb.c | 1 | ||||
-rw-r--r-- | drivers/usb/phy/phy-gpio-vbus-usb.c | 3 | ||||
-rw-r--r-- | drivers/usb/phy/phy-isp1301.c | 1 | ||||
-rw-r--r-- | drivers/usb/phy/phy-mv-u3d-usb.c | 5 | ||||
-rw-r--r-- | drivers/usb/phy/phy-mv-usb.c | 3 | ||||
-rw-r--r-- | drivers/usb/phy/phy-mxs-usb.c | 8 | ||||
-rw-r--r-- | drivers/usb/phy/phy-nop.c | 2 | ||||
-rw-r--r-- | drivers/usb/phy/phy-samsung-usb2.c | 5 | ||||
-rw-r--r-- | drivers/usb/phy/phy-samsung-usb3.c | 5 |
11 files changed, 16 insertions, 38 deletions
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 371d0e74e909..2311b1e4e43c 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig | |||
@@ -4,11 +4,17 @@ | |||
4 | menuconfig USB_PHY | 4 | menuconfig USB_PHY |
5 | bool "USB Physical Layer drivers" | 5 | bool "USB Physical Layer drivers" |
6 | help | 6 | help |
7 | USB controllers (those which are host, device or DRD) need a | 7 | Most USB controllers have the physical layer signalling part |
8 | device to handle the physical layer signalling, commonly called | 8 | (commonly called a PHY) built in. However, dual-role devices |
9 | a PHY. | 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. | ||
10 | 11 | ||
11 | The following drivers add support for such PHY devices. | 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. | ||
12 | 18 | ||
13 | if USB_PHY | 19 | if USB_PHY |
14 | 20 | ||
@@ -25,7 +31,7 @@ config AB8500_USB | |||
25 | 31 | ||
26 | config FSL_USB2_OTG | 32 | config FSL_USB2_OTG |
27 | bool "Freescale USB OTG Transceiver Driver" | 33 | bool "Freescale USB OTG Transceiver Driver" |
28 | depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_SUSPEND | 34 | depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME |
29 | select USB_OTG | 35 | select USB_OTG |
30 | help | 36 | help |
31 | Enable this to support Freescale USB OTG transceiver. | 37 | Enable this to support Freescale USB OTG transceiver. |
@@ -139,7 +145,6 @@ config USB_ISP1301 | |||
139 | tristate "NXP ISP1301 USB transceiver support" | 145 | tristate "NXP ISP1301 USB transceiver support" |
140 | depends on USB || USB_GADGET | 146 | depends on USB || USB_GADGET |
141 | depends on I2C | 147 | depends on I2C |
142 | select USB_OTG_UTILS | ||
143 | help | 148 | help |
144 | 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. |
145 | 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 |
@@ -162,7 +167,7 @@ config USB_MSM_OTG | |||
162 | 167 | ||
163 | config USB_MV_OTG | 168 | config USB_MV_OTG |
164 | tristate "Marvell USB OTG support" | 169 | tristate "Marvell USB OTG support" |
165 | depends on USB_EHCI_MV && USB_MV_UDC && USB_SUSPEND | 170 | depends on USB_EHCI_MV && USB_MV_UDC && PM_RUNTIME |
166 | select USB_OTG | 171 | select USB_OTG |
167 | help | 172 | help |
168 | Say Y here if you want to build Marvell USB OTG transciever | 173 | Say Y here if you want to build Marvell USB OTG transciever |
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c index 4acef26a2ef5..e5eb1b5a04eb 100644 --- a/drivers/usb/phy/phy-ab8500-usb.c +++ b/drivers/usb/phy/phy-ab8500-usb.c | |||
@@ -892,8 +892,6 @@ static int ab8500_usb_remove(struct platform_device *pdev) | |||
892 | else if (ab->mode == USB_PERIPHERAL) | 892 | else if (ab->mode == USB_PERIPHERAL) |
893 | ab8500_usb_peri_phy_dis(ab); | 893 | ab8500_usb_peri_phy_dis(ab); |
894 | 894 | ||
895 | platform_set_drvdata(pdev, NULL); | ||
896 | |||
897 | return 0; | 895 | return 0; |
898 | } | 896 | } |
899 | 897 | ||
diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c index 97b9308507c3..e771bafb9f1d 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c | |||
@@ -799,6 +799,7 @@ static int fsl_otg_conf(struct platform_device *pdev) | |||
799 | 799 | ||
800 | /* initialize the otg structure */ | 800 | /* initialize the otg structure */ |
801 | fsl_otg_tc->phy.label = DRIVER_DESC; | 801 | fsl_otg_tc->phy.label = DRIVER_DESC; |
802 | fsl_otg_tc->phy.dev = &pdev->dev; | ||
802 | fsl_otg_tc->phy.set_power = fsl_otg_set_power; | 803 | fsl_otg_tc->phy.set_power = fsl_otg_set_power; |
803 | 804 | ||
804 | fsl_otg_tc->phy.otg->phy = &fsl_otg_tc->phy; | 805 | fsl_otg_tc->phy.otg->phy = &fsl_otg_tc->phy; |
diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c index 4c76074e518d..8443335c2ea0 100644 --- a/drivers/usb/phy/phy-gpio-vbus-usb.c +++ b/drivers/usb/phy/phy-gpio-vbus-usb.c | |||
@@ -266,6 +266,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) | |||
266 | platform_set_drvdata(pdev, gpio_vbus); | 266 | platform_set_drvdata(pdev, gpio_vbus); |
267 | gpio_vbus->dev = &pdev->dev; | 267 | gpio_vbus->dev = &pdev->dev; |
268 | gpio_vbus->phy.label = "gpio-vbus"; | 268 | gpio_vbus->phy.label = "gpio-vbus"; |
269 | gpio_vbus->phy.dev = gpio_vbus->dev; | ||
269 | gpio_vbus->phy.set_power = gpio_vbus_set_power; | 270 | gpio_vbus->phy.set_power = gpio_vbus_set_power; |
270 | gpio_vbus->phy.set_suspend = gpio_vbus_set_suspend; | 271 | gpio_vbus->phy.set_suspend = gpio_vbus_set_suspend; |
271 | gpio_vbus->phy.state = OTG_STATE_UNDEFINED; | 272 | gpio_vbus->phy.state = OTG_STATE_UNDEFINED; |
@@ -343,7 +344,6 @@ err_irq: | |||
343 | gpio_free(pdata->gpio_pullup); | 344 | gpio_free(pdata->gpio_pullup); |
344 | gpio_free(pdata->gpio_vbus); | 345 | gpio_free(pdata->gpio_vbus); |
345 | err_gpio: | 346 | err_gpio: |
346 | platform_set_drvdata(pdev, NULL); | ||
347 | kfree(gpio_vbus->phy.otg); | 347 | kfree(gpio_vbus->phy.otg); |
348 | kfree(gpio_vbus); | 348 | kfree(gpio_vbus); |
349 | return err; | 349 | return err; |
@@ -365,7 +365,6 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) | |||
365 | if (gpio_is_valid(pdata->gpio_pullup)) | 365 | if (gpio_is_valid(pdata->gpio_pullup)) |
366 | gpio_free(pdata->gpio_pullup); | 366 | gpio_free(pdata->gpio_pullup); |
367 | gpio_free(gpio); | 367 | gpio_free(gpio); |
368 | platform_set_drvdata(pdev, NULL); | ||
369 | kfree(gpio_vbus->phy.otg); | 368 | kfree(gpio_vbus->phy.otg); |
370 | kfree(gpio_vbus); | 369 | kfree(gpio_vbus); |
371 | 370 | ||
diff --git a/drivers/usb/phy/phy-isp1301.c b/drivers/usb/phy/phy-isp1301.c index 225ae6c97eeb..8a55b37d1a02 100644 --- a/drivers/usb/phy/phy-isp1301.c +++ b/drivers/usb/phy/phy-isp1301.c | |||
@@ -102,6 +102,7 @@ static int isp1301_probe(struct i2c_client *client, | |||
102 | mutex_init(&isp->mutex); | 102 | mutex_init(&isp->mutex); |
103 | 103 | ||
104 | phy = &isp->phy; | 104 | phy = &isp->phy; |
105 | phy->dev = &client->dev; | ||
105 | phy->label = DRV_NAME; | 106 | phy->label = DRV_NAME; |
106 | phy->init = isp1301_phy_init; | 107 | phy->init = isp1301_phy_init; |
107 | phy->set_vbus = isp1301_phy_set_vbus; | 108 | phy->set_vbus = isp1301_phy_set_vbus; |
diff --git a/drivers/usb/phy/phy-mv-u3d-usb.c b/drivers/usb/phy/phy-mv-u3d-usb.c index f7838a43347c..1568ea63e338 100644 --- a/drivers/usb/phy/phy-mv-u3d-usb.c +++ b/drivers/usb/phy/phy-mv-u3d-usb.c | |||
@@ -278,11 +278,6 @@ static int mv_u3d_phy_probe(struct platform_device *pdev) | |||
278 | } | 278 | } |
279 | 279 | ||
280 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 280 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
281 | if (!res) { | ||
282 | dev_err(dev, "missing mem resource\n"); | ||
283 | return -ENODEV; | ||
284 | } | ||
285 | |||
286 | phy_base = devm_ioremap_resource(dev, res); | 281 | phy_base = devm_ioremap_resource(dev, res); |
287 | if (IS_ERR(phy_base)) | 282 | if (IS_ERR(phy_base)) |
288 | return PTR_ERR(phy_base); | 283 | return PTR_ERR(phy_base); |
diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c index c987bbe27851..4a6b03c73876 100644 --- a/drivers/usb/phy/phy-mv-usb.c +++ b/drivers/usb/phy/phy-mv-usb.c | |||
@@ -667,7 +667,6 @@ int mv_otg_remove(struct platform_device *pdev) | |||
667 | mv_otg_disable(mvotg); | 667 | mv_otg_disable(mvotg); |
668 | 668 | ||
669 | usb_remove_phy(&mvotg->phy); | 669 | usb_remove_phy(&mvotg->phy); |
670 | platform_set_drvdata(pdev, NULL); | ||
671 | 670 | ||
672 | return 0; | 671 | return 0; |
673 | } | 672 | } |
@@ -850,8 +849,6 @@ err_destroy_workqueue: | |||
850 | flush_workqueue(mvotg->qwork); | 849 | flush_workqueue(mvotg->qwork); |
851 | destroy_workqueue(mvotg->qwork); | 850 | destroy_workqueue(mvotg->qwork); |
852 | 851 | ||
853 | platform_set_drvdata(pdev, NULL); | ||
854 | |||
855 | return retval; | 852 | return retval; |
856 | } | 853 | } |
857 | 854 | ||
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 9d4381e64d51..bd601c537c8d 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c | |||
@@ -130,11 +130,6 @@ static int mxs_phy_probe(struct platform_device *pdev) | |||
130 | int ret; | 130 | int ret; |
131 | 131 | ||
132 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 132 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
133 | if (!res) { | ||
134 | dev_err(&pdev->dev, "can't get device resources\n"); | ||
135 | return -ENOENT; | ||
136 | } | ||
137 | |||
138 | base = devm_ioremap_resource(&pdev->dev, res); | 133 | base = devm_ioremap_resource(&pdev->dev, res); |
139 | if (IS_ERR(base)) | 134 | if (IS_ERR(base)) |
140 | return PTR_ERR(base); | 135 | return PTR_ERR(base); |
@@ -160,6 +155,7 @@ static int mxs_phy_probe(struct platform_device *pdev) | |||
160 | mxs_phy->phy.set_suspend = mxs_phy_suspend; | 155 | mxs_phy->phy.set_suspend = mxs_phy_suspend; |
161 | mxs_phy->phy.notify_connect = mxs_phy_on_connect; | 156 | mxs_phy->phy.notify_connect = mxs_phy_on_connect; |
162 | mxs_phy->phy.notify_disconnect = mxs_phy_on_disconnect; | 157 | mxs_phy->phy.notify_disconnect = mxs_phy_on_disconnect; |
158 | mxs_phy->phy.type = USB_PHY_TYPE_USB2; | ||
163 | 159 | ||
164 | ATOMIC_INIT_NOTIFIER_HEAD(&mxs_phy->phy.notifier); | 160 | ATOMIC_INIT_NOTIFIER_HEAD(&mxs_phy->phy.notifier); |
165 | 161 | ||
@@ -180,8 +176,6 @@ static int mxs_phy_remove(struct platform_device *pdev) | |||
180 | 176 | ||
181 | usb_remove_phy(&mxs_phy->phy); | 177 | usb_remove_phy(&mxs_phy->phy); |
182 | 178 | ||
183 | platform_set_drvdata(pdev, NULL); | ||
184 | |||
185 | return 0; | 179 | return 0; |
186 | } | 180 | } |
187 | 181 | ||
diff --git a/drivers/usb/phy/phy-nop.c b/drivers/usb/phy/phy-nop.c index 2b10cc969bbb..638cc5dade35 100644 --- a/drivers/usb/phy/phy-nop.c +++ b/drivers/usb/phy/phy-nop.c | |||
@@ -254,8 +254,6 @@ static int nop_usb_xceiv_remove(struct platform_device *pdev) | |||
254 | 254 | ||
255 | usb_remove_phy(&nop->phy); | 255 | usb_remove_phy(&nop->phy); |
256 | 256 | ||
257 | platform_set_drvdata(pdev, NULL); | ||
258 | |||
259 | return 0; | 257 | return 0; |
260 | } | 258 | } |
261 | 259 | ||
diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c index 45ffe036dacc..9d5e273abcc7 100644 --- a/drivers/usb/phy/phy-samsung-usb2.c +++ b/drivers/usb/phy/phy-samsung-usb2.c | |||
@@ -363,11 +363,6 @@ static int samsung_usb2phy_probe(struct platform_device *pdev) | |||
363 | int ret; | 363 | int ret; |
364 | 364 | ||
365 | phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 365 | phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
366 | if (!phy_mem) { | ||
367 | dev_err(dev, "%s: missing mem resource\n", __func__); | ||
368 | return -ENODEV; | ||
369 | } | ||
370 | |||
371 | phy_base = devm_ioremap_resource(dev, phy_mem); | 366 | phy_base = devm_ioremap_resource(dev, phy_mem); |
372 | if (IS_ERR(phy_base)) | 367 | if (IS_ERR(phy_base)) |
373 | return PTR_ERR(phy_base); | 368 | return PTR_ERR(phy_base); |
diff --git a/drivers/usb/phy/phy-samsung-usb3.c b/drivers/usb/phy/phy-samsung-usb3.c index 133f3d0c554f..5a9efcbcb532 100644 --- a/drivers/usb/phy/phy-samsung-usb3.c +++ b/drivers/usb/phy/phy-samsung-usb3.c | |||
@@ -239,11 +239,6 @@ static int samsung_usb3phy_probe(struct platform_device *pdev) | |||
239 | int ret; | 239 | int ret; |
240 | 240 | ||
241 | phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 241 | phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
242 | if (!phy_mem) { | ||
243 | dev_err(dev, "%s: missing mem resource\n", __func__); | ||
244 | return -ENODEV; | ||
245 | } | ||
246 | |||
247 | phy_base = devm_ioremap_resource(dev, phy_mem); | 242 | phy_base = devm_ioremap_resource(dev, phy_mem); |
248 | if (IS_ERR(phy_base)) | 243 | if (IS_ERR(phy_base)) |
249 | return PTR_ERR(phy_base); | 244 | return PTR_ERR(phy_base); |