diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-01 17:45:33 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-01 17:45:33 +0100 |
commit | 8062d94a545457a83d5291bd62c3bfd14200bba0 (patch) | |
tree | a6a7aaaea5dff00f7415a93189720a1164ae30dd /drivers/usb/musb/musb_gadget.c | |
parent | Merge tag 'musb-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ba... (diff) | |
parent | usb: otg: Convert all users to pass struct usb_otg for OTG functions (diff) | |
download | linux-8062d94a545457a83d5291bd62c3bfd14200bba0.tar.xz linux-8062d94a545457a83d5291bd62c3bfd14200bba0.zip |
Merge tag 'xceiv-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
USB: transceiver changes for 3.4
Here we have a big rework done by Heikki Krogerus (thanks) which
splits OTG functionality away from transceivers.
We have known for quite a long time that struct otg_transceiver was
a bad name for the structure, considering transceiver is far from
being OTG-specific (see 4e67185).
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 957d9ca3d06d..a495a3079c07 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1642,7 +1642,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget) } spin_unlock_irqrestore(&musb->lock, flags); - otg_start_srp(musb->xceiv); + otg_start_srp(musb->xceiv->otg); spin_lock_irqsave(&musb->lock, flags); /* Block idling for at least 1s */ @@ -1721,7 +1721,7 @@ static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) if (!musb->xceiv->set_power) return -EOPNOTSUPP; - return otg_set_power(musb->xceiv, mA); + return usb_phy_set_power(musb->xceiv, mA); } static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on) @@ -1916,6 +1916,7 @@ static int musb_gadget_start(struct usb_gadget *g, struct usb_gadget_driver *driver) { struct musb *musb = gadget_to_musb(g); + struct usb_otg *otg = musb->xceiv->otg; unsigned long flags; int retval = -EINVAL; @@ -1932,7 +1933,7 @@ static int musb_gadget_start(struct usb_gadget *g, spin_lock_irqsave(&musb->lock, flags); musb->is_active = 1; - otg_set_peripheral(musb->xceiv, &musb->g); + otg_set_peripheral(otg, &musb->g); musb->xceiv->state = OTG_STATE_B_IDLE; /* @@ -1963,8 +1964,8 @@ static int musb_gadget_start(struct usb_gadget *g, } if ((musb->xceiv->last_event == USB_EVENT_ID) - && musb->xceiv->set_vbus) - otg_set_vbus(musb->xceiv, 1); + && otg->set_vbus) + otg_set_vbus(otg, 1); hcd->self.uses_pio_for_control = 1; } @@ -2046,7 +2047,7 @@ static int musb_gadget_stop(struct usb_gadget *g, musb->xceiv->state = OTG_STATE_UNDEFINED; stop_activity(musb, driver); - otg_set_peripheral(musb->xceiv, NULL); + otg_set_peripheral(musb->xceiv->otg, NULL); dev_dbg(musb->controller, "unregistering driver %s\n", driver->function); |