From 901dcc448968cae7b9898c33c3df85236d837851 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Wed, 26 Sep 2007 10:40:27 -0700 Subject: [PATCH] musb_hdrc: Don't idle as host if VBUS timeout is 0 VBUS must be on all the time in this case. Signed-off-by: Tony Lindgren --- drivers/usb/musb/tusb6010.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 16eaa4825c3..3008b6de14f 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -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; -- 2.41.1