]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Don't idle as host if VBUS timeout is 0
authorTony Lindgren <tony@atomide.com>
Wed, 26 Sep 2007 17:40:27 +0000 (10:40 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 11 Oct 2007 21:31:34 +0000 (14:31 -0700)
VBUS must be on all the time in this case.

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/tusb6010.c

index 16eaa4825c3643ea5631ec15eadf0e956b65f778..3008b6de14f4cb3e033df1260a5d17c582260b8e 100644 (file)
@@ -482,7 +482,9 @@ void musb_platform_try_idle(struct musb *musb, unsigned long timeout)
        if (timeout == 0)
                timeout = default_timeout;
 
-       if (musb->is_active) {
+       /* Never idle if active, or when VBUS timeout is not set as host */
+       if (musb->is_active || ((musb->a_wait_bcon == 0)
+                       && (musb->xceiv.state == OTG_STATE_A_WAIT_BCON))) {
                DBG(4, "%s active, deleting timer\n", otg_state_string(musb));
                del_timer(&musb_idle_timer);
                last_timer = jiffies;