aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/omap_udc.c
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2012-02-13 06:24:18 -0500
committerFelipe Balbi <balbi@ti.com>2012-02-27 08:41:48 -0500
commitb96d3b08365f5a9603f50f3aadca6012f7eaffa1 (patch)
treefceda0fed3b03c96353dc8cd21a965ba986e3e09 /drivers/usb/gadget/omap_udc.c
parentb1c711d629358576e8896a18e74cd5f4d811d7f7 (diff)
usb: Convert all users to new usb_phy
Use the new usb_phy_* functions with transceiver operations instead of the old otg functions. Includes fixes from Sascha Hauer. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Acked-by: Li Yang <leoli@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/omap_udc.c')
-rw-r--r--drivers/usb/gadget/omap_udc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index d3529787351d..e82c6995ce26 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -1345,7 +1345,7 @@ static int omap_vbus_draw(struct usb_gadget *gadget, unsigned mA)
1345 1345
1346 udc = container_of(gadget, struct omap_udc, gadget); 1346 udc = container_of(gadget, struct omap_udc, gadget);
1347 if (udc->transceiver) 1347 if (udc->transceiver)
1348 return otg_set_power(udc->transceiver, mA); 1348 return usb_phy_set_power(udc->transceiver, mA);
1349 return -EOPNOTSUPP; 1349 return -EOPNOTSUPP;
1350} 1350}
1351 1351
@@ -1839,11 +1839,13 @@ static void devstate_irq(struct omap_udc *udc, u16 irq_src)
1839 spin_lock(&udc->lock); 1839 spin_lock(&udc->lock);
1840 } 1840 }
1841 if (udc->transceiver) 1841 if (udc->transceiver)
1842 otg_set_suspend(udc->transceiver, 1); 1842 usb_phy_set_suspend(
1843 udc->transceiver, 1);
1843 } else { 1844 } else {
1844 VDBG("resume\n"); 1845 VDBG("resume\n");
1845 if (udc->transceiver) 1846 if (udc->transceiver)
1846 otg_set_suspend(udc->transceiver, 0); 1847 usb_phy_set_suspend(
1848 udc->transceiver, 0);
1847 if (udc->gadget.speed == USB_SPEED_FULL 1849 if (udc->gadget.speed == USB_SPEED_FULL
1848 && udc->driver->resume) { 1850 && udc->driver->resume) {
1849 spin_unlock(&udc->lock); 1851 spin_unlock(&udc->lock);
@@ -2863,7 +2865,7 @@ static int __init omap_udc_probe(struct platform_device *pdev)
2863 * 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;
2864 * but not having one probably means no VBUS detection. 2866 * but not having one probably means no VBUS detection.
2865 */ 2867 */
2866 xceiv = otg_get_transceiver(); 2868 xceiv = usb_get_transceiver();
2867 if (xceiv) 2869 if (xceiv)
2868 type = xceiv->label; 2870 type = xceiv->label;
2869 else if (config->otg) { 2871 else if (config->otg) {
@@ -3009,7 +3011,7 @@ cleanup1:
3009 3011
3010cleanup0: 3012cleanup0:
3011 if (xceiv) 3013 if (xceiv)
3012 otg_put_transceiver(xceiv); 3014 usb_put_transceiver(xceiv);
3013 3015
3014 if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) { 3016 if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) {
3015 clk_disable(hhc_clk); 3017 clk_disable(hhc_clk);
@@ -3039,7 +3041,7 @@ static int __exit omap_udc_remove(struct platform_device *pdev)
3039 3041
3040 pullup_disable(udc); 3042 pullup_disable(udc);
3041 if (udc->transceiver) { 3043 if (udc->transceiver) {
3042 otg_put_transceiver(udc->transceiver); 3044 usb_put_transceiver(udc->transceiver);
3043 udc->transceiver = NULL; 3045 udc->transceiver = NULL;
3044 } 3046 }
3045 omap_writew(0, UDC_SYSCON1); 3047 omap_writew(0, UDC_SYSCON1);