summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2013-10-30 15:38:23 +0100
committerFelipe Balbi <balbi@ti.com>2013-11-26 18:44:40 +0100
commit5ace3d00fa11bb9ec5e1cc02805ac27201f27e61 (patch)
tree714f6498e9c8d309326793e57f558480f92f8fd0 /drivers/usb
parentusb: phy: Add OTG FSM configuration option (diff)
downloadlinux-5ace3d00fa11bb9ec5e1cc02805ac27201f27e61.tar.xz
linux-5ace3d00fa11bb9ec5e1cc02805ac27201f27e61.zip
usb: musb: dsps: polling ID pin status only in otg mode
Only start the otg_timer in dual role mode; otherwise in peripheral mode when musb is disconnected from the host port, otg_timer starts and continuously toggles the session, which causes VBUS pulse. Signed-off-by: Bin Liu <b-liu@ti.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_dsps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 7cfa6e80ad60..593d3c962565 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -359,8 +359,9 @@ static irqreturn_t dsps_interrupt(int irq, void *hci)
if (musb->int_tx || musb->int_rx || musb->int_usb)
ret |= musb_interrupt(musb);
- /* Poll for ID change */
- if (musb->xceiv->state == OTG_STATE_B_IDLE)
+ /* Poll for ID change in OTG port mode */
+ if (musb->xceiv->state == OTG_STATE_B_IDLE &&
+ musb->port_mode == MUSB_PORT_MODE_DUAL_ROLE)
mod_timer(&glue->timer, jiffies + wrp->poll_seconds * HZ);
out:
spin_unlock_irqrestore(&musb->lock, flags);