aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/otg_fsm.c
diff options
context:
space:
mode:
authorLi Jun <B47624@freescale.com>2014-07-18 04:16:09 -0400
committerLi Jun <B47624@freescale.com>2014-07-18 04:28:31 -0400
commit8532e80d479ef7ea61e288b321c10d1b14933196 (patch)
treeaef83f8239d3d9e2c20eb6d439125219fbad9ff8 /drivers/usb/chipidea/otg_fsm.c
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>
Diffstat (limited to 'drivers/usb/chipidea/otg_fsm.c')
-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)
669 */ 669 */
670 ci_otg_queue_work(ci); 670 ci_otg_queue_work(ci);
671 } 671 }
672 } else if (ci->transceiver->state == OTG_STATE_A_HOST) {
673 if (!timer_pending(&ci->timer))
674 pm_runtime_get(ci->dev);
675 mod_timer(&ci->timer, jiffies + msecs_to_jiffies(2000));
672 } 676 }
673 } 677 }
674 pm_runtime_put_sync(ci->dev); 678 pm_runtime_put_sync(ci->dev);