diff options
Diffstat (limited to 'drivers/usb/gadget/omap_udc.c')
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 576cd8578b4..ace8a652b32 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c @@ -1213,7 +1213,7 @@ static int omap_wakeup(struct usb_gadget *gadget) /* NOTE: non-OTG systems may use SRP TOO... */ } else if (!(udc->devstat & UDC_ATT)) { if (udc->transceiver) - retval = otg_start_srp(udc->transceiver); + retval = otg_start_srp(udc->transceiver->otg); } spin_unlock_irqrestore(&udc->lock, flags); @@ -1345,7 +1345,7 @@ static int omap_vbus_draw(struct usb_gadget *gadget, unsigned mA) udc = container_of(gadget, struct omap_udc, gadget); if (udc->transceiver) - return otg_set_power(udc->transceiver, mA); + return usb_phy_set_power(udc->transceiver, mA); return -EOPNOTSUPP; } @@ -1839,11 +1839,13 @@ static void devstate_irq(struct omap_udc *udc, u16 irq_src) spin_lock(&udc->lock); } if (udc->transceiver) - otg_set_suspend(udc->transceiver, 1); + usb_phy_set_suspend( + udc->transceiver, 1); } else { VDBG("resume\n"); if (udc->transceiver) - otg_set_suspend(udc->transceiver, 0); + usb_phy_set_suspend( + udc->transceiver, 0); if (udc->gadget.speed == USB_SPEED_FULL && udc->driver->resume) { spin_unlock(&udc->lock); @@ -2154,7 +2156,8 @@ static int omap_udc_start(struct usb_gadget_driver *driver, /* connect to bus through transceiver */ if (udc->transceiver) { - status = otg_set_peripheral(udc->transceiver, &udc->gadget); + status = otg_set_peripheral(udc->transceiver->otg, + &udc->gadget); if (status < 0) { ERR("can't bind to transceiver\n"); if (driver->unbind) { @@ -2200,7 +2203,7 @@ static int omap_udc_stop(struct usb_gadget_driver *driver) omap_vbus_session(&udc->gadget, 0); if (udc->transceiver) - (void) otg_set_peripheral(udc->transceiver, NULL); + (void) otg_set_peripheral(udc->transceiver->otg, NULL); else pullup_disable(udc); @@ -2650,7 +2653,7 @@ static void omap_udc_release(struct device *dev) } static int __init -omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv) +omap_udc_setup(struct platform_device *odev, struct usb_phy *xceiv) { unsigned tmp, buf; @@ -2790,7 +2793,7 @@ static int __init omap_udc_probe(struct platform_device *pdev) { int status = -ENODEV; int hmc; - struct otg_transceiver *xceiv = NULL; + struct usb_phy *xceiv = NULL; const char *type = NULL; struct omap_usb_config *config = pdev->dev.platform_data; struct clk *dc_clk; @@ -2863,7 +2866,7 @@ static int __init omap_udc_probe(struct platform_device *pdev) * use it. Except for OTG, we don't _need_ to talk to one; * but not having one probably means no VBUS detection. */ - xceiv = otg_get_transceiver(); + xceiv = usb_get_transceiver(); if (xceiv) type = xceiv->label; else if (config->otg) { @@ -3009,7 +3012,7 @@ cleanup1: cleanup0: if (xceiv) - otg_put_transceiver(xceiv); + usb_put_transceiver(xceiv); if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) { clk_disable(hhc_clk); @@ -3039,7 +3042,7 @@ static int __exit omap_udc_remove(struct platform_device *pdev) pullup_disable(udc); if (udc->transceiver) { - otg_put_transceiver(udc->transceiver); + usb_put_transceiver(udc->transceiver); udc->transceiver = NULL; } omap_writew(0, UDC_SYSCON1); |