Merge branch 'pm-sleep'
* pm-sleep: PM / s2idle: Invoke the ->wake() platform callback earlier
This commit is contained in:
commit
ca935f8e76
@ -120,22 +120,26 @@ static void s2idle_loop(void)
|
|||||||
* frozen processes + suspended devices + idle processors.
|
* frozen processes + suspended devices + idle processors.
|
||||||
* Thus s2idle_enter() should be called right after
|
* Thus s2idle_enter() should be called right after
|
||||||
* all devices have been suspended.
|
* all devices have been suspended.
|
||||||
|
*
|
||||||
|
* Wakeups during the noirq suspend of devices may be spurious,
|
||||||
|
* so prevent them from terminating the loop right away.
|
||||||
*/
|
*/
|
||||||
error = dpm_noirq_suspend_devices(PMSG_SUSPEND);
|
error = dpm_noirq_suspend_devices(PMSG_SUSPEND);
|
||||||
if (!error)
|
if (!error)
|
||||||
s2idle_enter();
|
s2idle_enter();
|
||||||
|
else if (error == -EBUSY && pm_wakeup_pending())
|
||||||
|
error = 0;
|
||||||
|
|
||||||
dpm_noirq_resume_devices(PMSG_RESUME);
|
if (!error && s2idle_ops && s2idle_ops->wake)
|
||||||
if (error && (error != -EBUSY || !pm_wakeup_pending())) {
|
|
||||||
dpm_noirq_end();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (s2idle_ops && s2idle_ops->wake)
|
|
||||||
s2idle_ops->wake();
|
s2idle_ops->wake();
|
||||||
|
|
||||||
|
dpm_noirq_resume_devices(PMSG_RESUME);
|
||||||
|
|
||||||
dpm_noirq_end();
|
dpm_noirq_end();
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
break;
|
||||||
|
|
||||||
if (s2idle_ops && s2idle_ops->sync)
|
if (s2idle_ops && s2idle_ops->sync)
|
||||||
s2idle_ops->sync();
|
s2idle_ops->sync();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user