]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
MLK-10101-2 usb: chipidea: otg: delay to enter low power mode for a_host
authorLi Jun <jun.li@freescale.com>
Tue, 27 Jan 2015 03:30:35 +0000 (11:30 +0800)
committerLi Jun <jun.li@freescale.com>
Wed, 28 Jan 2015 03:08:36 +0000 (11:08 +0800)
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 <jun.li@freescale.com>
drivers/usb/chipidea/otg_fsm.c

index ac3dcf3837a04c10009de6ed2ccb2205708cda4b..04cdecec867201541c987ba270c94ecfaf444619 100644 (file)
@@ -699,6 +699,10 @@ int ci_otg_fsm_work(struct ci_hdrc *ci)
                                 */
                                ci_otg_queue_work(ci);
                        }
+               } else if (ci->fsm.otg->state == OTG_STATE_A_HOST) {
+                       pm_runtime_mark_last_busy(ci->dev);
+                       pm_runtime_put_autosuspend(ci->dev);
+                       return 0;
                }
        }
        pm_runtime_put_sync(ci->dev);