summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jun <B47624@freescale.com>2014-07-18 16:16:09 +0800
committerLi Jun <B47624@freescale.com>2014-07-18 16:28:31 +0800
commit8532e80d479ef7ea61e288b321c10d1b14933196 (patch)
treeaef83f8239d3d9e2c20eb6d439125219fbad9ff8
parentad0a08722750b31b594fec65e12439d911fa0a01 (diff)
ENGR00323241 usb: chipidea: otg: delay 2s to decrease power.usage_count
There is 2s delay for controller resume from usb wakeup case already, in OTG fsm mode, A-dev can start a new session via sys input file(means not via usb wakeup), in this case, A-dev still need the 2s delay for host root hub access registers, otherwise system will hang due to access register at low power mode. Signed-off-by: Li Jun <b47624@freescale.com>
-rw-r--r--drivers/usb/chipidea/otg_fsm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 6faab2a06053..f258860365cb 100644
--- a/drivers/usb/chipidea/otg_fsm.c
+++ b/drivers/usb/chipidea/otg_fsm.c
@@ -669,6 +669,10 @@ int ci_otg_fsm_work(struct ci_hdrc *ci)
*/
ci_otg_queue_work(ci);
}
+ } else if (ci->transceiver->state == OTG_STATE_A_HOST) {
+ if (!timer_pending(&ci->timer))
+ pm_runtime_get(ci->dev);
+ mod_timer(&ci->timer, jiffies + msecs_to_jiffies(2000));
}
}
pm_runtime_put_sync(ci->dev);