Commit bd3f8900 authored by Bin Liu's avatar Bin Liu Committed by Greg Kroah-Hartman

usb: musb: dsps: keep VBUS on for host-only mode

commit b3addcf0 upstream.

Currently VBUS is turned off while a usb device is detached, and turned
on again by the polling routine. This short period VBUS loss prevents
usb modem to switch mode.

VBUS should be constantly on for host-only mode, so this changes the
driver to not turn off VBUS for host-only mode.

Fixes: 2f3fd2c5 ("usb: musb: Prepare dsps glue layer for PM runtime support")
Reported-by: default avatarMoreno Bartalucci <moreno.bartalucci@tecnorama.it>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a317afc0
......@@ -213,6 +213,12 @@ static int dsps_check_status(struct musb *musb, void *unused)
msecs_to_jiffies(wrp->poll_timeout));
break;
case OTG_STATE_A_WAIT_BCON:
/* keep VBUS on for host-only mode */
if (musb->port_mode == MUSB_PORT_MODE_HOST) {
mod_timer(&glue->timer, jiffies +
msecs_to_jiffies(wrp->poll_timeout));
break;
}
musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
skip_session = 1;
/* fall */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment