diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2012-06-22 07:32:45 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-06-25 07:04:26 -0400 |
commit | 721002ec1dd55a52425455826af49cf8853b2d4f (patch) | |
tree | 41d990b5f1a14d9e7bda9258083ee2628bf736e1 /drivers/usb | |
parent | 6b03b13336ee5d8da7bda8799c9ed990e3daedcc (diff) |
usb: otg: utils: rename function name in OTG utils
_transceiver() in otg.c is replaced with _phy. usb_set_transceiver is
replaced with usb_add_phy to make it similar to other usb standard
function names like usb_add_hcd.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
31 files changed, 86 insertions, 86 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 51f96942dc5e..4468f2c2dddd 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1687,7 +1687,7 @@ static int udc_start(struct ci13xxx *udc) | |||
1687 | 1687 | ||
1688 | udc->gadget.ep0 = &udc->ep0in->ep; | 1688 | udc->gadget.ep0 = &udc->ep0in->ep; |
1689 | 1689 | ||
1690 | udc->transceiver = usb_get_transceiver(); | 1690 | udc->transceiver = usb_get_phy(); |
1691 | 1691 | ||
1692 | if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) { | 1692 | if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) { |
1693 | if (udc->transceiver == NULL) { | 1693 | if (udc->transceiver == NULL) { |
@@ -1731,7 +1731,7 @@ static int udc_start(struct ci13xxx *udc) | |||
1731 | remove_trans: | 1731 | remove_trans: |
1732 | if (udc->transceiver) { | 1732 | if (udc->transceiver) { |
1733 | otg_set_peripheral(udc->transceiver->otg, &udc->gadget); | 1733 | otg_set_peripheral(udc->transceiver->otg, &udc->gadget); |
1734 | usb_put_transceiver(udc->transceiver); | 1734 | usb_put_phy(udc->transceiver); |
1735 | } | 1735 | } |
1736 | 1736 | ||
1737 | dev_err(dev, "error = %i\n", retval); | 1737 | dev_err(dev, "error = %i\n", retval); |
@@ -1741,7 +1741,7 @@ unreg_device: | |||
1741 | device_unregister(&udc->gadget.dev); | 1741 | device_unregister(&udc->gadget.dev); |
1742 | put_transceiver: | 1742 | put_transceiver: |
1743 | if (udc->transceiver) | 1743 | if (udc->transceiver) |
1744 | usb_put_transceiver(udc->transceiver); | 1744 | usb_put_phy(udc->transceiver); |
1745 | free_pools: | 1745 | free_pools: |
1746 | dma_pool_destroy(udc->td_pool); | 1746 | dma_pool_destroy(udc->td_pool); |
1747 | free_qh_pool: | 1747 | free_qh_pool: |
@@ -1774,7 +1774,7 @@ static void udc_stop(struct ci13xxx *udc) | |||
1774 | 1774 | ||
1775 | if (udc->transceiver) { | 1775 | if (udc->transceiver) { |
1776 | otg_set_peripheral(udc->transceiver->otg, NULL); | 1776 | otg_set_peripheral(udc->transceiver->otg, NULL); |
1777 | usb_put_transceiver(udc->transceiver); | 1777 | usb_put_phy(udc->transceiver); |
1778 | } | 1778 | } |
1779 | dbg_remove_files(&udc->gadget.dev); | 1779 | dbg_remove_files(&udc->gadget.dev); |
1780 | device_unregister(&udc->gadget.dev); | 1780 | device_unregister(&udc->gadget.dev); |
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 28316858208b..d7038509b956 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c | |||
@@ -2455,7 +2455,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev) | |||
2455 | 2455 | ||
2456 | #ifdef CONFIG_USB_OTG | 2456 | #ifdef CONFIG_USB_OTG |
2457 | if (pdata->operating_mode == FSL_USB2_DR_OTG) { | 2457 | if (pdata->operating_mode == FSL_USB2_DR_OTG) { |
2458 | udc_controller->transceiver = usb_get_transceiver(); | 2458 | udc_controller->transceiver = usb_get_phy(); |
2459 | if (!udc_controller->transceiver) { | 2459 | if (!udc_controller->transceiver) { |
2460 | ERR("Can't find OTG driver!\n"); | 2460 | ERR("Can't find OTG driver!\n"); |
2461 | ret = -ENODEV; | 2461 | ret = -ENODEV; |
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index dbcd1329495e..5d779955d5a6 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c | |||
@@ -2180,7 +2180,7 @@ static int __devinit mv_udc_probe(struct platform_device *dev) | |||
2180 | 2180 | ||
2181 | #ifdef CONFIG_USB_OTG_UTILS | 2181 | #ifdef CONFIG_USB_OTG_UTILS |
2182 | if (pdata->mode == MV_USB_MODE_OTG) | 2182 | if (pdata->mode == MV_USB_MODE_OTG) |
2183 | udc->transceiver = usb_get_transceiver(); | 2183 | udc->transceiver = usb_get_phy(); |
2184 | #endif | 2184 | #endif |
2185 | 2185 | ||
2186 | udc->clknum = pdata->clknum; | 2186 | udc->clknum = pdata->clknum; |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 7ba32469c5bd..74b9bb8099e7 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -2865,7 +2865,7 @@ static int __init omap_udc_probe(struct platform_device *pdev) | |||
2865 | * use it. Except for OTG, we don't _need_ to talk to one; | 2865 | * use it. Except for OTG, we don't _need_ to talk to one; |
2866 | * but not having one probably means no VBUS detection. | 2866 | * but not having one probably means no VBUS detection. |
2867 | */ | 2867 | */ |
2868 | xceiv = usb_get_transceiver(); | 2868 | xceiv = usb_get_phy(); |
2869 | if (xceiv) | 2869 | if (xceiv) |
2870 | type = xceiv->label; | 2870 | type = xceiv->label; |
2871 | else if (config->otg) { | 2871 | else if (config->otg) { |
@@ -3011,7 +3011,7 @@ cleanup1: | |||
3011 | 3011 | ||
3012 | cleanup0: | 3012 | cleanup0: |
3013 | if (xceiv) | 3013 | if (xceiv) |
3014 | usb_put_transceiver(xceiv); | 3014 | usb_put_phy(xceiv); |
3015 | 3015 | ||
3016 | if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) { | 3016 | if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) { |
3017 | clk_disable(hhc_clk); | 3017 | clk_disable(hhc_clk); |
@@ -3041,7 +3041,7 @@ static int __exit omap_udc_remove(struct platform_device *pdev) | |||
3041 | 3041 | ||
3042 | pullup_disable(udc); | 3042 | pullup_disable(udc); |
3043 | if (udc->transceiver) { | 3043 | if (udc->transceiver) { |
3044 | usb_put_transceiver(udc->transceiver); | 3044 | usb_put_phy(udc->transceiver); |
3045 | udc->transceiver = NULL; | 3045 | udc->transceiver = NULL; |
3046 | } | 3046 | } |
3047 | omap_writew(0, UDC_SYSCON1); | 3047 | omap_writew(0, UDC_SYSCON1); |
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index d7c8cb3bf759..a658e446caba 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
@@ -2159,7 +2159,7 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) | |||
2159 | dev->dev = &pdev->dev; | 2159 | dev->dev = &pdev->dev; |
2160 | dev->mach = pdev->dev.platform_data; | 2160 | dev->mach = pdev->dev.platform_data; |
2161 | 2161 | ||
2162 | dev->transceiver = usb_get_transceiver(); | 2162 | dev->transceiver = usb_get_phy(); |
2163 | 2163 | ||
2164 | if (gpio_is_valid(dev->mach->gpio_pullup)) { | 2164 | if (gpio_is_valid(dev->mach->gpio_pullup)) { |
2165 | if ((retval = gpio_request(dev->mach->gpio_pullup, | 2165 | if ((retval = gpio_request(dev->mach->gpio_pullup, |
@@ -2238,7 +2238,7 @@ lubbock_fail0: | |||
2238 | gpio_free(dev->mach->gpio_pullup); | 2238 | gpio_free(dev->mach->gpio_pullup); |
2239 | err_gpio_pullup: | 2239 | err_gpio_pullup: |
2240 | if (dev->transceiver) { | 2240 | if (dev->transceiver) { |
2241 | usb_put_transceiver(dev->transceiver); | 2241 | usb_put_phy(dev->transceiver); |
2242 | dev->transceiver = NULL; | 2242 | dev->transceiver = NULL; |
2243 | } | 2243 | } |
2244 | clk_put(dev->clk); | 2244 | clk_put(dev->clk); |
@@ -2280,7 +2280,7 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev) | |||
2280 | clk_put(dev->clk); | 2280 | clk_put(dev->clk); |
2281 | 2281 | ||
2282 | if (dev->transceiver) { | 2282 | if (dev->transceiver) { |
2283 | usb_put_transceiver(dev->transceiver); | 2283 | usb_put_phy(dev->transceiver); |
2284 | dev->transceiver = NULL; | 2284 | dev->transceiver = NULL; |
2285 | } | 2285 | } |
2286 | 2286 | ||
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 98acb3ab9e17..b982304a49c1 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -2464,7 +2464,7 @@ static int __init pxa_udc_probe(struct platform_device *pdev) | |||
2464 | 2464 | ||
2465 | udc->dev = &pdev->dev; | 2465 | udc->dev = &pdev->dev; |
2466 | udc->mach = pdev->dev.platform_data; | 2466 | udc->mach = pdev->dev.platform_data; |
2467 | udc->transceiver = usb_get_transceiver(); | 2467 | udc->transceiver = usb_get_phy(); |
2468 | 2468 | ||
2469 | gpio = udc->mach->gpio_pullup; | 2469 | gpio = udc->mach->gpio_pullup; |
2470 | if (gpio_is_valid(gpio)) { | 2470 | if (gpio_is_valid(gpio)) { |
@@ -2543,7 +2543,7 @@ static int __exit pxa_udc_remove(struct platform_device *_dev) | |||
2543 | if (gpio_is_valid(gpio)) | 2543 | if (gpio_is_valid(gpio)) |
2544 | gpio_free(gpio); | 2544 | gpio_free(gpio); |
2545 | 2545 | ||
2546 | usb_put_transceiver(udc->transceiver); | 2546 | usb_put_phy(udc->transceiver); |
2547 | 2547 | ||
2548 | udc->transceiver = NULL; | 2548 | udc->transceiver = NULL; |
2549 | platform_set_drvdata(_dev, NULL); | 2549 | platform_set_drvdata(_dev, NULL); |
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index 36c6836eeb0f..9ad33395f564 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c | |||
@@ -1282,7 +1282,7 @@ static int __devinit s3c_hsudc_probe(struct platform_device *pdev) | |||
1282 | hsudc->dev = dev; | 1282 | hsudc->dev = dev; |
1283 | hsudc->pd = pdev->dev.platform_data; | 1283 | hsudc->pd = pdev->dev.platform_data; |
1284 | 1284 | ||
1285 | hsudc->transceiver = usb_get_transceiver(); | 1285 | hsudc->transceiver = usb_get_phy(); |
1286 | 1286 | ||
1287 | for (i = 0; i < ARRAY_SIZE(hsudc->supplies); i++) | 1287 | for (i = 0; i < ARRAY_SIZE(hsudc->supplies); i++) |
1288 | hsudc->supplies[i].supply = s3c_hsudc_supply_names[i]; | 1288 | hsudc->supplies[i].supply = s3c_hsudc_supply_names[i]; |
@@ -1386,7 +1386,7 @@ err_remap: | |||
1386 | release_mem_region(res->start, resource_size(res)); | 1386 | release_mem_region(res->start, resource_size(res)); |
1387 | err_res: | 1387 | err_res: |
1388 | if (hsudc->transceiver) | 1388 | if (hsudc->transceiver) |
1389 | usb_put_transceiver(hsudc->transceiver); | 1389 | usb_put_phy(hsudc->transceiver); |
1390 | 1390 | ||
1391 | regulator_bulk_free(ARRAY_SIZE(hsudc->supplies), hsudc->supplies); | 1391 | regulator_bulk_free(ARRAY_SIZE(hsudc->supplies), hsudc->supplies); |
1392 | err_supplies: | 1392 | err_supplies: |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 43362577b54a..0e8976a0ed51 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -142,7 +142,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
142 | if (pdata->operating_mode == FSL_USB2_DR_OTG) { | 142 | if (pdata->operating_mode == FSL_USB2_DR_OTG) { |
143 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 143 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
144 | 144 | ||
145 | ehci->transceiver = usb_get_transceiver(); | 145 | ehci->transceiver = usb_get_phy(); |
146 | dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, transceiver=0x%p\n", | 146 | dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, transceiver=0x%p\n", |
147 | hcd, ehci, ehci->transceiver); | 147 | hcd, ehci, ehci->transceiver); |
148 | 148 | ||
@@ -150,7 +150,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
150 | retval = otg_set_host(ehci->transceiver->otg, | 150 | retval = otg_set_host(ehci->transceiver->otg, |
151 | &ehci_to_hcd(ehci)->self); | 151 | &ehci_to_hcd(ehci)->self); |
152 | if (retval) { | 152 | if (retval) { |
153 | usb_put_transceiver(ehci->transceiver); | 153 | usb_put_phy(ehci->transceiver); |
154 | goto err4; | 154 | goto err4; |
155 | } | 155 | } |
156 | } else { | 156 | } else { |
@@ -194,7 +194,7 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd, | |||
194 | 194 | ||
195 | if (ehci->transceiver) { | 195 | if (ehci->transceiver) { |
196 | otg_set_host(ehci->transceiver->otg, NULL); | 196 | otg_set_host(ehci->transceiver->otg, NULL); |
197 | usb_put_transceiver(ehci->transceiver); | 197 | usb_put_phy(ehci->transceiver); |
198 | } | 198 | } |
199 | 199 | ||
200 | usb_remove_hcd(hcd); | 200 | usb_remove_hcd(hcd); |
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index 9803a55fd5f4..7badd5db398c 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c | |||
@@ -145,7 +145,7 @@ static int ehci_msm_probe(struct platform_device *pdev) | |||
145 | * powering up VBUS, mapping of registers address space and power | 145 | * powering up VBUS, mapping of registers address space and power |
146 | * management. | 146 | * management. |
147 | */ | 147 | */ |
148 | phy = usb_get_transceiver(); | 148 | phy = usb_get_phy(); |
149 | if (!phy) { | 149 | if (!phy) { |
150 | dev_err(&pdev->dev, "unable to find transceiver\n"); | 150 | dev_err(&pdev->dev, "unable to find transceiver\n"); |
151 | ret = -ENODEV; | 151 | ret = -ENODEV; |
@@ -169,7 +169,7 @@ static int ehci_msm_probe(struct platform_device *pdev) | |||
169 | return 0; | 169 | return 0; |
170 | 170 | ||
171 | put_transceiver: | 171 | put_transceiver: |
172 | usb_put_transceiver(phy); | 172 | usb_put_phy(phy); |
173 | unmap: | 173 | unmap: |
174 | iounmap(hcd->regs); | 174 | iounmap(hcd->regs); |
175 | put_hcd: | 175 | put_hcd: |
@@ -187,7 +187,7 @@ static int __devexit ehci_msm_remove(struct platform_device *pdev) | |||
187 | pm_runtime_set_suspended(&pdev->dev); | 187 | pm_runtime_set_suspended(&pdev->dev); |
188 | 188 | ||
189 | otg_set_host(phy->otg, NULL); | 189 | otg_set_host(phy->otg, NULL); |
190 | usb_put_transceiver(phy); | 190 | usb_put_phy(phy); |
191 | 191 | ||
192 | usb_put_hcd(hcd); | 192 | usb_put_hcd(hcd); |
193 | 193 | ||
diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index a936bbcff8f4..24f838fe25ac 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c | |||
@@ -253,7 +253,7 @@ static int mv_ehci_probe(struct platform_device *pdev) | |||
253 | ehci_mv->mode = pdata->mode; | 253 | ehci_mv->mode = pdata->mode; |
254 | if (ehci_mv->mode == MV_USB_MODE_OTG) { | 254 | if (ehci_mv->mode == MV_USB_MODE_OTG) { |
255 | #ifdef CONFIG_USB_OTG_UTILS | 255 | #ifdef CONFIG_USB_OTG_UTILS |
256 | ehci_mv->otg = usb_get_transceiver(); | 256 | ehci_mv->otg = usb_get_phy(); |
257 | if (!ehci_mv->otg) { | 257 | if (!ehci_mv->otg) { |
258 | dev_err(&pdev->dev, | 258 | dev_err(&pdev->dev, |
259 | "unable to find transceiver\n"); | 259 | "unable to find transceiver\n"); |
@@ -303,7 +303,7 @@ err_set_vbus: | |||
303 | #ifdef CONFIG_USB_OTG_UTILS | 303 | #ifdef CONFIG_USB_OTG_UTILS |
304 | err_put_transceiver: | 304 | err_put_transceiver: |
305 | if (ehci_mv->otg) | 305 | if (ehci_mv->otg) |
306 | usb_put_transceiver(ehci_mv->otg); | 306 | usb_put_phy(ehci_mv->otg); |
307 | #endif | 307 | #endif |
308 | err_disable_clk: | 308 | err_disable_clk: |
309 | mv_ehci_disable(ehci_mv); | 309 | mv_ehci_disable(ehci_mv); |
@@ -333,7 +333,7 @@ static int mv_ehci_remove(struct platform_device *pdev) | |||
333 | 333 | ||
334 | if (ehci_mv->otg) { | 334 | if (ehci_mv->otg) { |
335 | otg_set_host(ehci_mv->otg->otg, NULL); | 335 | otg_set_host(ehci_mv->otg->otg, NULL); |
336 | usb_put_transceiver(ehci_mv->otg); | 336 | usb_put_phy(ehci_mv->otg); |
337 | } | 337 | } |
338 | 338 | ||
339 | if (ehci_mv->mode == MV_USB_MODE_HOST) { | 339 | if (ehci_mv->mode == MV_USB_MODE_HOST) { |
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 68548236ec42..ee17d19b1b82 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c | |||
@@ -749,7 +749,7 @@ static int tegra_ehci_probe(struct platform_device *pdev) | |||
749 | 749 | ||
750 | #ifdef CONFIG_USB_OTG_UTILS | 750 | #ifdef CONFIG_USB_OTG_UTILS |
751 | if (pdata->operating_mode == TEGRA_USB_OTG) { | 751 | if (pdata->operating_mode == TEGRA_USB_OTG) { |
752 | tegra->transceiver = usb_get_transceiver(); | 752 | tegra->transceiver = usb_get_phy(); |
753 | if (tegra->transceiver) | 753 | if (tegra->transceiver) |
754 | otg_set_host(tegra->transceiver->otg, &hcd->self); | 754 | otg_set_host(tegra->transceiver->otg, &hcd->self); |
755 | } | 755 | } |
@@ -775,7 +775,7 @@ fail: | |||
775 | #ifdef CONFIG_USB_OTG_UTILS | 775 | #ifdef CONFIG_USB_OTG_UTILS |
776 | if (tegra->transceiver) { | 776 | if (tegra->transceiver) { |
777 | otg_set_host(tegra->transceiver->otg, NULL); | 777 | otg_set_host(tegra->transceiver->otg, NULL); |
778 | usb_put_transceiver(tegra->transceiver); | 778 | usb_put_phy(tegra->transceiver); |
779 | } | 779 | } |
780 | #endif | 780 | #endif |
781 | tegra_usb_phy_close(tegra->phy); | 781 | tegra_usb_phy_close(tegra->phy); |
@@ -810,7 +810,7 @@ static int tegra_ehci_remove(struct platform_device *pdev) | |||
810 | #ifdef CONFIG_USB_OTG_UTILS | 810 | #ifdef CONFIG_USB_OTG_UTILS |
811 | if (tegra->transceiver) { | 811 | if (tegra->transceiver) { |
812 | otg_set_host(tegra->transceiver->otg, NULL); | 812 | otg_set_host(tegra->transceiver->otg, NULL); |
813 | usb_put_transceiver(tegra->transceiver); | 813 | usb_put_phy(tegra->transceiver); |
814 | } | 814 | } |
815 | #endif | 815 | #endif |
816 | 816 | ||
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 9ce35d0d9d5d..c2c1f55889a4 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -211,14 +211,14 @@ static int ohci_omap_init(struct usb_hcd *hcd) | |||
211 | 211 | ||
212 | #ifdef CONFIG_USB_OTG | 212 | #ifdef CONFIG_USB_OTG |
213 | if (need_transceiver) { | 213 | if (need_transceiver) { |
214 | ohci->transceiver = usb_get_transceiver(); | 214 | ohci->transceiver = usb_get_phy(); |
215 | if (ohci->transceiver) { | 215 | if (ohci->transceiver) { |
216 | int status = otg_set_host(ohci->transceiver->otg, | 216 | int status = otg_set_host(ohci->transceiver->otg, |
217 | &ohci_to_hcd(ohci)->self); | 217 | &ohci_to_hcd(ohci)->self); |
218 | dev_dbg(hcd->self.controller, "init %s transceiver, status %d\n", | 218 | dev_dbg(hcd->self.controller, "init %s transceiver, status %d\n", |
219 | ohci->transceiver->label, status); | 219 | ohci->transceiver->label, status); |
220 | if (status) { | 220 | if (status) { |
221 | usb_put_transceiver(ohci->transceiver); | 221 | usb_put_phy(ohci->transceiver); |
222 | return status; | 222 | return status; |
223 | } | 223 | } |
224 | } else { | 224 | } else { |
@@ -405,7 +405,7 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) | |||
405 | usb_remove_hcd(hcd); | 405 | usb_remove_hcd(hcd); |
406 | if (ohci->transceiver) { | 406 | if (ohci->transceiver) { |
407 | (void) otg_set_host(ohci->transceiver->otg, 0); | 407 | (void) otg_set_host(ohci->transceiver->otg, 0); |
408 | usb_put_transceiver(ohci->transceiver); | 408 | usb_put_phy(ohci->transceiver); |
409 | } | 409 | } |
410 | if (machine_is_omap_osk()) | 410 | if (machine_is_omap_osk()) |
411 | gpio_free(9); | 411 | gpio_free(9); |
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c index 9f3eda91ea4d..a75989bbb3d4 100644 --- a/drivers/usb/musb/am35x.c +++ b/drivers/usb/musb/am35x.c | |||
@@ -364,7 +364,7 @@ static int am35x_musb_init(struct musb *musb) | |||
364 | return -ENODEV; | 364 | return -ENODEV; |
365 | 365 | ||
366 | usb_nop_xceiv_register(); | 366 | usb_nop_xceiv_register(); |
367 | musb->xceiv = usb_get_transceiver(); | 367 | musb->xceiv = usb_get_phy(); |
368 | if (!musb->xceiv) | 368 | if (!musb->xceiv) |
369 | return -ENODEV; | 369 | return -ENODEV; |
370 | 370 | ||
@@ -406,7 +406,7 @@ static int am35x_musb_exit(struct musb *musb) | |||
406 | if (data->set_phy_power) | 406 | if (data->set_phy_power) |
407 | data->set_phy_power(0); | 407 | data->set_phy_power(0); |
408 | 408 | ||
409 | usb_put_transceiver(musb->xceiv); | 409 | usb_put_phy(musb->xceiv); |
410 | usb_nop_xceiv_unregister(); | 410 | usb_nop_xceiv_unregister(); |
411 | 411 | ||
412 | return 0; | 412 | return 0; |
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index a087ed6c3be9..522a4a263df8 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -415,7 +415,7 @@ static int bfin_musb_init(struct musb *musb) | |||
415 | gpio_direction_output(musb->config->gpio_vrsel, 0); | 415 | gpio_direction_output(musb->config->gpio_vrsel, 0); |
416 | 416 | ||
417 | usb_nop_xceiv_register(); | 417 | usb_nop_xceiv_register(); |
418 | musb->xceiv = usb_get_transceiver(); | 418 | musb->xceiv = usb_get_phy(); |
419 | if (!musb->xceiv) { | 419 | if (!musb->xceiv) { |
420 | gpio_free(musb->config->gpio_vrsel); | 420 | gpio_free(musb->config->gpio_vrsel); |
421 | return -ENODEV; | 421 | return -ENODEV; |
@@ -440,7 +440,7 @@ static int bfin_musb_exit(struct musb *musb) | |||
440 | { | 440 | { |
441 | gpio_free(musb->config->gpio_vrsel); | 441 | gpio_free(musb->config->gpio_vrsel); |
442 | 442 | ||
443 | usb_put_transceiver(musb->xceiv); | 443 | usb_put_phy(musb->xceiv); |
444 | usb_nop_xceiv_unregister(); | 444 | usb_nop_xceiv_unregister(); |
445 | return 0; | 445 | return 0; |
446 | } | 446 | } |
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index 8bd9566f3fbb..61868d604b28 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c | |||
@@ -425,7 +425,7 @@ static int da8xx_musb_init(struct musb *musb) | |||
425 | goto fail; | 425 | goto fail; |
426 | 426 | ||
427 | usb_nop_xceiv_register(); | 427 | usb_nop_xceiv_register(); |
428 | musb->xceiv = usb_get_transceiver(); | 428 | musb->xceiv = usb_get_phy(); |
429 | if (!musb->xceiv) | 429 | if (!musb->xceiv) |
430 | goto fail; | 430 | goto fail; |
431 | 431 | ||
@@ -458,7 +458,7 @@ static int da8xx_musb_exit(struct musb *musb) | |||
458 | 458 | ||
459 | phy_off(); | 459 | phy_off(); |
460 | 460 | ||
461 | usb_put_transceiver(musb->xceiv); | 461 | usb_put_phy(musb->xceiv); |
462 | usb_nop_xceiv_unregister(); | 462 | usb_nop_xceiv_unregister(); |
463 | 463 | ||
464 | return 0; | 464 | return 0; |
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 768b4b55c816..441f776366f3 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c | |||
@@ -384,7 +384,7 @@ static int davinci_musb_init(struct musb *musb) | |||
384 | u32 revision; | 384 | u32 revision; |
385 | 385 | ||
386 | usb_nop_xceiv_register(); | 386 | usb_nop_xceiv_register(); |
387 | musb->xceiv = usb_get_transceiver(); | 387 | musb->xceiv = usb_get_phy(); |
388 | if (!musb->xceiv) | 388 | if (!musb->xceiv) |
389 | goto unregister; | 389 | goto unregister; |
390 | 390 | ||
@@ -443,7 +443,7 @@ static int davinci_musb_init(struct musb *musb) | |||
443 | return 0; | 443 | return 0; |
444 | 444 | ||
445 | fail: | 445 | fail: |
446 | usb_put_transceiver(musb->xceiv); | 446 | usb_put_phy(musb->xceiv); |
447 | unregister: | 447 | unregister: |
448 | usb_nop_xceiv_unregister(); | 448 | usb_nop_xceiv_unregister(); |
449 | return -ENODEV; | 449 | return -ENODEV; |
@@ -493,7 +493,7 @@ static int davinci_musb_exit(struct musb *musb) | |||
493 | 493 | ||
494 | phy_off(); | 494 | phy_off(); |
495 | 495 | ||
496 | usb_put_transceiver(musb->xceiv); | 496 | usb_put_phy(musb->xceiv); |
497 | usb_nop_xceiv_unregister(); | 497 | usb_nop_xceiv_unregister(); |
498 | 498 | ||
499 | return 0; | 499 | return 0; |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index db3dff854b71..26f1befb4896 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1909,7 +1909,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
1909 | /* The musb_platform_init() call: | 1909 | /* The musb_platform_init() call: |
1910 | * - adjusts musb->mregs and musb->isr if needed, | 1910 | * - adjusts musb->mregs and musb->isr if needed, |
1911 | * - may initialize an integrated tranceiver | 1911 | * - may initialize an integrated tranceiver |
1912 | * - initializes musb->xceiv, usually by otg_get_transceiver() | 1912 | * - initializes musb->xceiv, usually by otg_get_phy() |
1913 | * - stops powering VBUS | 1913 | * - stops powering VBUS |
1914 | * | 1914 | * |
1915 | * There are various transceiver configurations. Blackfin, | 1915 | * There are various transceiver configurations. Blackfin, |
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 23db42db761a..716c113608f4 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -376,7 +376,7 @@ static int dsps_musb_init(struct musb *musb) | |||
376 | 376 | ||
377 | /* NOP driver needs change if supporting dual instance */ | 377 | /* NOP driver needs change if supporting dual instance */ |
378 | usb_nop_xceiv_register(); | 378 | usb_nop_xceiv_register(); |
379 | musb->xceiv = usb_get_transceiver(); | 379 | musb->xceiv = usb_get_phy(); |
380 | if (!musb->xceiv) | 380 | if (!musb->xceiv) |
381 | return -ENODEV; | 381 | return -ENODEV; |
382 | 382 | ||
@@ -409,7 +409,7 @@ static int dsps_musb_init(struct musb *musb) | |||
409 | 409 | ||
410 | return 0; | 410 | return 0; |
411 | err0: | 411 | err0: |
412 | usb_put_transceiver(musb->xceiv); | 412 | usb_put_phy(musb->xceiv); |
413 | usb_nop_xceiv_unregister(); | 413 | usb_nop_xceiv_unregister(); |
414 | return status; | 414 | return status; |
415 | } | 415 | } |
@@ -430,7 +430,7 @@ static int dsps_musb_exit(struct musb *musb) | |||
430 | data->set_phy_power(0); | 430 | data->set_phy_power(0); |
431 | 431 | ||
432 | /* NOP driver needs change if supporting dual instance */ | 432 | /* NOP driver needs change if supporting dual instance */ |
433 | usb_put_transceiver(musb->xceiv); | 433 | usb_put_phy(musb->xceiv); |
434 | usb_nop_xceiv_unregister(); | 434 | usb_nop_xceiv_unregister(); |
435 | 435 | ||
436 | return 0; | 436 | return 0; |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index c7785e81254c..e16dbbf7f305 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -292,7 +292,7 @@ static int omap2430_musb_init(struct musb *musb) | |||
292 | * up through ULPI. TWL4030-family PMICs include one, | 292 | * up through ULPI. TWL4030-family PMICs include one, |
293 | * which needs a driver, drivers aren't always needed. | 293 | * which needs a driver, drivers aren't always needed. |
294 | */ | 294 | */ |
295 | musb->xceiv = usb_get_transceiver(); | 295 | musb->xceiv = usb_get_phy(); |
296 | if (!musb->xceiv) { | 296 | if (!musb->xceiv) { |
297 | pr_err("HS USB OTG: no transceiver configured\n"); | 297 | pr_err("HS USB OTG: no transceiver configured\n"); |
298 | return -ENODEV; | 298 | return -ENODEV; |
@@ -391,7 +391,7 @@ static int omap2430_musb_exit(struct musb *musb) | |||
391 | cancel_work_sync(&musb->otg_notifier_work); | 391 | cancel_work_sync(&musb->otg_notifier_work); |
392 | 392 | ||
393 | omap2430_low_level_exit(musb); | 393 | omap2430_low_level_exit(musb); |
394 | usb_put_transceiver(musb->xceiv); | 394 | usb_put_phy(musb->xceiv); |
395 | 395 | ||
396 | return 0; | 396 | return 0; |
397 | } | 397 | } |
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index de1355946a83..a004736186f1 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c | |||
@@ -1078,7 +1078,7 @@ static int tusb_musb_init(struct musb *musb) | |||
1078 | int ret; | 1078 | int ret; |
1079 | 1079 | ||
1080 | usb_nop_xceiv_register(); | 1080 | usb_nop_xceiv_register(); |
1081 | musb->xceiv = usb_get_transceiver(); | 1081 | musb->xceiv = usb_get_phy(); |
1082 | if (!musb->xceiv) | 1082 | if (!musb->xceiv) |
1083 | return -ENODEV; | 1083 | return -ENODEV; |
1084 | 1084 | ||
@@ -1130,7 +1130,7 @@ done: | |||
1130 | if (sync) | 1130 | if (sync) |
1131 | iounmap(sync); | 1131 | iounmap(sync); |
1132 | 1132 | ||
1133 | usb_put_transceiver(musb->xceiv); | 1133 | usb_put_phy(musb->xceiv); |
1134 | usb_nop_xceiv_unregister(); | 1134 | usb_nop_xceiv_unregister(); |
1135 | } | 1135 | } |
1136 | return ret; | 1136 | return ret; |
@@ -1146,7 +1146,7 @@ static int tusb_musb_exit(struct musb *musb) | |||
1146 | 1146 | ||
1147 | iounmap(musb->sync_va); | 1147 | iounmap(musb->sync_va); |
1148 | 1148 | ||
1149 | usb_put_transceiver(musb->xceiv); | 1149 | usb_put_phy(musb->xceiv); |
1150 | usb_nop_xceiv_unregister(); | 1150 | usb_nop_xceiv_unregister(); |
1151 | return 0; | 1151 | return 0; |
1152 | } | 1152 | } |
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index aa09dd417b94..53006b113b12 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c | |||
@@ -37,7 +37,7 @@ struct ux500_glue { | |||
37 | 37 | ||
38 | static int ux500_musb_init(struct musb *musb) | 38 | static int ux500_musb_init(struct musb *musb) |
39 | { | 39 | { |
40 | musb->xceiv = usb_get_transceiver(); | 40 | musb->xceiv = usb_get_phy(); |
41 | if (!musb->xceiv) { | 41 | if (!musb->xceiv) { |
42 | pr_err("HS USB OTG: no transceiver configured\n"); | 42 | pr_err("HS USB OTG: no transceiver configured\n"); |
43 | return -ENODEV; | 43 | return -ENODEV; |
@@ -48,7 +48,7 @@ static int ux500_musb_init(struct musb *musb) | |||
48 | 48 | ||
49 | static int ux500_musb_exit(struct musb *musb) | 49 | static int ux500_musb_exit(struct musb *musb) |
50 | { | 50 | { |
51 | usb_put_transceiver(musb->xceiv); | 51 | usb_put_phy(musb->xceiv); |
52 | 52 | ||
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c index a84af677dc59..672e28c81437 100644 --- a/drivers/usb/otg/ab8500-usb.c +++ b/drivers/usb/otg/ab8500-usb.c | |||
@@ -529,7 +529,7 @@ static int __devinit ab8500_usb_probe(struct platform_device *pdev) | |||
529 | if (err < 0) | 529 | if (err < 0) |
530 | goto fail0; | 530 | goto fail0; |
531 | 531 | ||
532 | err = usb_set_transceiver(&ab->phy); | 532 | err = usb_add_phy(&ab->phy); |
533 | if (err) { | 533 | if (err) { |
534 | dev_err(&pdev->dev, "Can't register transceiver\n"); | 534 | dev_err(&pdev->dev, "Can't register transceiver\n"); |
535 | goto fail1; | 535 | goto fail1; |
@@ -556,7 +556,7 @@ static int __devexit ab8500_usb_remove(struct platform_device *pdev) | |||
556 | 556 | ||
557 | cancel_work_sync(&ab->phy_dis_work); | 557 | cancel_work_sync(&ab->phy_dis_work); |
558 | 558 | ||
559 | usb_set_transceiver(NULL); | 559 | usb_add_phy(NULL); |
560 | 560 | ||
561 | ab8500_usb_host_phy_dis(ab); | 561 | ab8500_usb_host_phy_dis(ab); |
562 | ab8500_usb_peri_phy_dis(ab); | 562 | ab8500_usb_peri_phy_dis(ab); |
diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c index be4a63e8302f..73561edd81de 100644 --- a/drivers/usb/otg/fsl_otg.c +++ b/drivers/usb/otg/fsl_otg.c | |||
@@ -806,7 +806,7 @@ static int fsl_otg_conf(struct platform_device *pdev) | |||
806 | fsl_otg_dev = fsl_otg_tc; | 806 | fsl_otg_dev = fsl_otg_tc; |
807 | 807 | ||
808 | /* Store the otg transceiver */ | 808 | /* Store the otg transceiver */ |
809 | status = usb_set_transceiver(&fsl_otg_tc->phy); | 809 | status = usb_add_phy(&fsl_otg_tc->phy); |
810 | if (status) { | 810 | if (status) { |
811 | pr_warn(FSL_OTG_NAME ": unable to register OTG transceiver.\n"); | 811 | pr_warn(FSL_OTG_NAME ": unable to register OTG transceiver.\n"); |
812 | goto err; | 812 | goto err; |
@@ -824,7 +824,7 @@ err: | |||
824 | int usb_otg_start(struct platform_device *pdev) | 824 | int usb_otg_start(struct platform_device *pdev) |
825 | { | 825 | { |
826 | struct fsl_otg *p_otg; | 826 | struct fsl_otg *p_otg; |
827 | struct usb_phy *otg_trans = usb_get_transceiver(); | 827 | struct usb_phy *otg_trans = usb_get_phy(); |
828 | struct otg_fsm *fsm; | 828 | struct otg_fsm *fsm; |
829 | int status; | 829 | int status; |
830 | struct resource *res; | 830 | struct resource *res; |
@@ -1134,7 +1134,7 @@ static int __devexit fsl_otg_remove(struct platform_device *pdev) | |||
1134 | { | 1134 | { |
1135 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; | 1135 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; |
1136 | 1136 | ||
1137 | usb_set_transceiver(NULL); | 1137 | usb_add_phy(NULL); |
1138 | free_irq(fsl_otg_dev->irq, fsl_otg_dev); | 1138 | free_irq(fsl_otg_dev->irq, fsl_otg_dev); |
1139 | 1139 | ||
1140 | iounmap((void *)usb_dr_regs); | 1140 | iounmap((void *)usb_dr_regs); |
diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index bde6298a9693..9b3c264cdb56 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c | |||
@@ -320,7 +320,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) | |||
320 | } | 320 | } |
321 | 321 | ||
322 | /* only active when a gadget is registered */ | 322 | /* only active when a gadget is registered */ |
323 | err = usb_set_transceiver(&gpio_vbus->phy); | 323 | err = usb_add_phy(&gpio_vbus->phy); |
324 | if (err) { | 324 | if (err) { |
325 | dev_err(&pdev->dev, "can't register transceiver, err: %d\n", | 325 | dev_err(&pdev->dev, "can't register transceiver, err: %d\n", |
326 | err); | 326 | err); |
@@ -354,7 +354,7 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) | |||
354 | cancel_delayed_work_sync(&gpio_vbus->work); | 354 | cancel_delayed_work_sync(&gpio_vbus->work); |
355 | regulator_put(gpio_vbus->vbus_draw); | 355 | regulator_put(gpio_vbus->vbus_draw); |
356 | 356 | ||
357 | usb_set_transceiver(NULL); | 357 | usb_add_phy(NULL); |
358 | 358 | ||
359 | free_irq(gpio_vbus->irq, pdev); | 359 | free_irq(gpio_vbus->irq, pdev); |
360 | if (gpio_is_valid(pdata->gpio_pullup)) | 360 | if (gpio_is_valid(pdata->gpio_pullup)) |
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c index 33cd709b084e..b74df3fec56f 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c | |||
@@ -1611,7 +1611,7 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id) | |||
1611 | dev_dbg(&i2c->dev, "scheduled timer, %d min\n", TIMER_MINUTES); | 1611 | dev_dbg(&i2c->dev, "scheduled timer, %d min\n", TIMER_MINUTES); |
1612 | #endif | 1612 | #endif |
1613 | 1613 | ||
1614 | status = usb_set_transceiver(&isp->phy); | 1614 | status = usb_add_phy(&isp->phy); |
1615 | if (status < 0) | 1615 | if (status < 0) |
1616 | dev_err(&i2c->dev, "can't register transceiver, %d\n", | 1616 | dev_err(&i2c->dev, "can't register transceiver, %d\n", |
1617 | status); | 1617 | status); |
@@ -1650,7 +1650,7 @@ subsys_initcall(isp_init); | |||
1650 | static void __exit isp_exit(void) | 1650 | static void __exit isp_exit(void) |
1651 | { | 1651 | { |
1652 | if (the_transceiver) | 1652 | if (the_transceiver) |
1653 | usb_set_transceiver(NULL); | 1653 | usb_add_phy(NULL); |
1654 | i2c_del_driver(&isp1301_driver); | 1654 | i2c_del_driver(&isp1301_driver); |
1655 | } | 1655 | } |
1656 | module_exit(isp_exit); | 1656 | module_exit(isp_exit); |
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c index 1d0347c247d1..dd606c010035 100644 --- a/drivers/usb/otg/msm_otg.c +++ b/drivers/usb/otg/msm_otg.c | |||
@@ -1555,9 +1555,9 @@ static int __init msm_otg_probe(struct platform_device *pdev) | |||
1555 | phy->otg->set_host = msm_otg_set_host; | 1555 | phy->otg->set_host = msm_otg_set_host; |
1556 | phy->otg->set_peripheral = msm_otg_set_peripheral; | 1556 | phy->otg->set_peripheral = msm_otg_set_peripheral; |
1557 | 1557 | ||
1558 | ret = usb_set_transceiver(&motg->phy); | 1558 | ret = usb_add_phy(&motg->phy); |
1559 | if (ret) { | 1559 | if (ret) { |
1560 | dev_err(&pdev->dev, "usb_set_transceiver failed\n"); | 1560 | dev_err(&pdev->dev, "usb_add_phy failed\n"); |
1561 | goto free_irq; | 1561 | goto free_irq; |
1562 | } | 1562 | } |
1563 | 1563 | ||
@@ -1624,7 +1624,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev) | |||
1624 | device_init_wakeup(&pdev->dev, 0); | 1624 | device_init_wakeup(&pdev->dev, 0); |
1625 | pm_runtime_disable(&pdev->dev); | 1625 | pm_runtime_disable(&pdev->dev); |
1626 | 1626 | ||
1627 | usb_set_transceiver(NULL); | 1627 | usb_add_phy(NULL); |
1628 | free_irq(motg->irq, motg); | 1628 | free_irq(motg->irq, motg); |
1629 | 1629 | ||
1630 | /* | 1630 | /* |
diff --git a/drivers/usb/otg/mv_otg.c b/drivers/usb/otg/mv_otg.c index 6cc6c3ffbb83..18e90fe1fbd1 100644 --- a/drivers/usb/otg/mv_otg.c +++ b/drivers/usb/otg/mv_otg.c | |||
@@ -690,7 +690,7 @@ int mv_otg_remove(struct platform_device *pdev) | |||
690 | for (clk_i = 0; clk_i <= mvotg->clknum; clk_i++) | 690 | for (clk_i = 0; clk_i <= mvotg->clknum; clk_i++) |
691 | clk_put(mvotg->clk[clk_i]); | 691 | clk_put(mvotg->clk[clk_i]); |
692 | 692 | ||
693 | usb_set_transceiver(NULL); | 693 | usb_add_phy(NULL); |
694 | platform_set_drvdata(pdev, NULL); | 694 | platform_set_drvdata(pdev, NULL); |
695 | 695 | ||
696 | kfree(mvotg->phy.otg); | 696 | kfree(mvotg->phy.otg); |
@@ -853,7 +853,7 @@ static int mv_otg_probe(struct platform_device *pdev) | |||
853 | goto err_disable_clk; | 853 | goto err_disable_clk; |
854 | } | 854 | } |
855 | 855 | ||
856 | retval = usb_set_transceiver(&mvotg->phy); | 856 | retval = usb_add_phy(&mvotg->phy); |
857 | if (retval < 0) { | 857 | if (retval < 0) { |
858 | dev_err(&pdev->dev, "can't register transceiver, %d\n", | 858 | dev_err(&pdev->dev, "can't register transceiver, %d\n", |
859 | retval); | 859 | retval); |
@@ -880,7 +880,7 @@ static int mv_otg_probe(struct platform_device *pdev) | |||
880 | return 0; | 880 | return 0; |
881 | 881 | ||
882 | err_set_transceiver: | 882 | err_set_transceiver: |
883 | usb_set_transceiver(NULL); | 883 | usb_add_phy(NULL); |
884 | err_free_irq: | 884 | err_free_irq: |
885 | free_irq(mvotg->irq, mvotg); | 885 | free_irq(mvotg->irq, mvotg); |
886 | err_disable_clk: | 886 | err_disable_clk: |
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c index 58b26df6afd1..33000dae7200 100644 --- a/drivers/usb/otg/nop-usb-xceiv.c +++ b/drivers/usb/otg/nop-usb-xceiv.c | |||
@@ -117,7 +117,7 @@ static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev) | |||
117 | nop->phy.otg->set_host = nop_set_host; | 117 | nop->phy.otg->set_host = nop_set_host; |
118 | nop->phy.otg->set_peripheral = nop_set_peripheral; | 118 | nop->phy.otg->set_peripheral = nop_set_peripheral; |
119 | 119 | ||
120 | err = usb_set_transceiver(&nop->phy); | 120 | err = usb_add_phy(&nop->phy); |
121 | if (err) { | 121 | if (err) { |
122 | dev_err(&pdev->dev, "can't register transceiver, err: %d\n", | 122 | dev_err(&pdev->dev, "can't register transceiver, err: %d\n", |
123 | err); | 123 | err); |
@@ -139,7 +139,7 @@ static int __devexit nop_usb_xceiv_remove(struct platform_device *pdev) | |||
139 | { | 139 | { |
140 | struct nop_usb_xceiv *nop = platform_get_drvdata(pdev); | 140 | struct nop_usb_xceiv *nop = platform_get_drvdata(pdev); |
141 | 141 | ||
142 | usb_set_transceiver(NULL); | 142 | usb_add_phy(NULL); |
143 | 143 | ||
144 | platform_set_drvdata(pdev, NULL); | 144 | platform_set_drvdata(pdev, NULL); |
145 | kfree(nop->phy.otg); | 145 | kfree(nop->phy.otg); |
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c index 801e597a1541..300a995cfdbe 100644 --- a/drivers/usb/otg/otg.c +++ b/drivers/usb/otg/otg.c | |||
@@ -18,53 +18,53 @@ | |||
18 | static struct usb_phy *phy; | 18 | static struct usb_phy *phy; |
19 | 19 | ||
20 | /** | 20 | /** |
21 | * usb_get_transceiver - find the (single) USB transceiver | 21 | * usb_get_phy - find the (single) USB PHY |
22 | * | 22 | * |
23 | * Returns the transceiver driver, after getting a refcount to it; or | 23 | * Returns the phy driver, after getting a refcount to it; or |
24 | * null if there is no such transceiver. The caller is responsible for | 24 | * null if there is no such phy. The caller is responsible for |
25 | * calling usb_put_transceiver() to release that count. | 25 | * calling usb_put_phy() to release that count. |
26 | * | 26 | * |
27 | * For use by USB host and peripheral drivers. | 27 | * For use by USB host and peripheral drivers. |
28 | */ | 28 | */ |
29 | struct usb_phy *usb_get_transceiver(void) | 29 | struct usb_phy *usb_get_phy(void) |
30 | { | 30 | { |
31 | if (phy) | 31 | if (phy) |
32 | get_device(phy->dev); | 32 | get_device(phy->dev); |
33 | return phy; | 33 | return phy; |
34 | } | 34 | } |
35 | EXPORT_SYMBOL(usb_get_transceiver); | 35 | EXPORT_SYMBOL(usb_get_phy); |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * usb_put_transceiver - release the (single) USB transceiver | 38 | * usb_put_phy - release the (single) USB PHY |
39 | * @x: the transceiver returned by usb_get_transceiver() | 39 | * @x: the phy returned by usb_get_phy() |
40 | * | 40 | * |
41 | * Releases a refcount the caller received from usb_get_transceiver(). | 41 | * Releases a refcount the caller received from usb_get_phy(). |
42 | * | 42 | * |
43 | * For use by USB host and peripheral drivers. | 43 | * For use by USB host and peripheral drivers. |
44 | */ | 44 | */ |
45 | void usb_put_transceiver(struct usb_phy *x) | 45 | void usb_put_phy(struct usb_phy *x) |
46 | { | 46 | { |
47 | if (x) | 47 | if (x) |
48 | put_device(x->dev); | 48 | put_device(x->dev); |
49 | } | 49 | } |
50 | EXPORT_SYMBOL(usb_put_transceiver); | 50 | EXPORT_SYMBOL(usb_put_phy); |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * usb_set_transceiver - declare the (single) USB transceiver | 53 | * usb_add_phy - declare the (single) USB PHY |
54 | * @x: the USB transceiver to be used; or NULL | 54 | * @x: the USB phy to be used; or NULL |
55 | * | 55 | * |
56 | * This call is exclusively for use by transceiver drivers, which | 56 | * This call is exclusively for use by phy drivers, which |
57 | * coordinate the activities of drivers for host and peripheral | 57 | * coordinate the activities of drivers for host and peripheral |
58 | * controllers, and in some cases for VBUS current regulation. | 58 | * controllers, and in some cases for VBUS current regulation. |
59 | */ | 59 | */ |
60 | int usb_set_transceiver(struct usb_phy *x) | 60 | int usb_add_phy(struct usb_phy *x) |
61 | { | 61 | { |
62 | if (phy && x) | 62 | if (phy && x) |
63 | return -EBUSY; | 63 | return -EBUSY; |
64 | phy = x; | 64 | phy = x; |
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | EXPORT_SYMBOL(usb_set_transceiver); | 67 | EXPORT_SYMBOL(usb_add_phy); |
68 | 68 | ||
69 | const char *otg_state_string(enum usb_otg_state state) | 69 | const char *otg_state_string(enum usb_otg_state state) |
70 | { | 70 | { |
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 02979306bf83..01022c891e26 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c | |||
@@ -633,7 +633,7 @@ static int __devinit twl4030_usb_probe(struct platform_device *pdev) | |||
633 | kfree(twl); | 633 | kfree(twl); |
634 | return err; | 634 | return err; |
635 | } | 635 | } |
636 | usb_set_transceiver(&twl->phy); | 636 | usb_add_phy(&twl->phy); |
637 | 637 | ||
638 | platform_set_drvdata(pdev, twl); | 638 | platform_set_drvdata(pdev, twl); |
639 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) | 639 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) |
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index d2a9a8e691b9..a8be20878eb9 100644 --- a/drivers/usb/otg/twl6030-usb.c +++ b/drivers/usb/otg/twl6030-usb.c | |||
@@ -443,7 +443,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev) | |||
443 | kfree(twl); | 443 | kfree(twl); |
444 | return err; | 444 | return err; |
445 | } | 445 | } |
446 | usb_set_transceiver(&twl->phy); | 446 | usb_add_phy(&twl->phy); |
447 | 447 | ||
448 | platform_set_drvdata(pdev, twl); | 448 | platform_set_drvdata(pdev, twl); |
449 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) | 449 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) |