diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-01 08:45:33 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-01 08:45:33 -0800 |
commit | 8062d94a545457a83d5291bd62c3bfd14200bba0 (patch) | |
tree | a6a7aaaea5dff00f7415a93189720a1164ae30dd /drivers/usb/musb/davinci.c | |
parent | 15e68a803573974409972e761d8f08f03fce5bdb (diff) | |
parent | 6e13c6505cdff9766d5268ffb8c972c1a2f996e6 (diff) |
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/davinci.c')
-rw-r--r-- | drivers/usb/musb/davinci.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 0ba3e75285cf..97ab975fa442 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c @@ -265,6 +265,7 @@ static irqreturn_t davinci_musb_interrupt(int irq, void *__hci) unsigned long flags; irqreturn_t retval = IRQ_NONE; struct musb *musb = __hci; + struct usb_otg *otg = musb->xceiv->otg; void __iomem *tibase = musb->ctrl_base; struct cppi *cppi; u32 tmp; @@ -331,14 +332,14 @@ static irqreturn_t davinci_musb_interrupt(int irq, void *__hci) WARNING("VBUS error workaround (delay coming)\n"); } else if (is_host_enabled(musb) && drvvbus) { MUSB_HST_MODE(musb); - musb->xceiv->default_a = 1; + otg->default_a = 1; musb->xceiv->state = OTG_STATE_A_WAIT_VRISE; portstate(musb->port1_status |= USB_PORT_STAT_POWER); del_timer(&otg_workaround); } else { musb->is_active = 0; MUSB_DEV_MODE(musb); - musb->xceiv->default_a = 0; + otg->default_a = 0; musb->xceiv->state = OTG_STATE_B_IDLE; portstate(musb->port1_status &= ~USB_PORT_STAT_POWER); } @@ -383,7 +384,7 @@ static int davinci_musb_init(struct musb *musb) u32 revision; usb_nop_xceiv_register(); - musb->xceiv = otg_get_transceiver(); + musb->xceiv = usb_get_transceiver(); if (!musb->xceiv) return -ENODEV; @@ -442,7 +443,7 @@ static int davinci_musb_init(struct musb *musb) return 0; fail: - otg_put_transceiver(musb->xceiv); + usb_put_transceiver(musb->xceiv); usb_nop_xceiv_unregister(); return -ENODEV; } @@ -464,7 +465,7 @@ static int davinci_musb_exit(struct musb *musb) davinci_musb_source_power(musb, 0 /*off*/, 1); /* delay, to avoid problems with module reload */ - if (is_host_enabled(musb) && musb->xceiv->default_a) { + if (is_host_enabled(musb) && musb->xceiv->otg->default_a) { int maxdelay = 30; u8 devctl, warn = 0; @@ -491,7 +492,7 @@ static int davinci_musb_exit(struct musb *musb) phy_off(); - otg_put_transceiver(musb->xceiv); + usb_put_transceiver(musb->xceiv); usb_nop_xceiv_unregister(); return 0; |