diff options
Diffstat (limited to 'Documentation/power/runtime_pm.txt')
-rw-r--r-- | Documentation/power/runtime_pm.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 0ec3d610fc9a..d50dd1ab590d 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -583,6 +583,13 @@ this is: | |||
583 | pm_runtime_set_active(dev); | 583 | pm_runtime_set_active(dev); |
584 | pm_runtime_enable(dev); | 584 | pm_runtime_enable(dev); |
585 | 585 | ||
586 | The PM core always increments the run-time usage counter before calling the | ||
587 | ->suspend() callback and decrements it after calling the ->resume() callback. | ||
588 | Hence disabling run-time PM temporarily like this will not cause any runtime | ||
589 | suspend attempts to be permanently lost. If the usage count goes to zero | ||
590 | following the return of the ->resume() callback, the ->runtime_idle() callback | ||
591 | will be invoked as usual. | ||
592 | |||
586 | On some systems, however, system sleep is not entered through a global firmware | 593 | On some systems, however, system sleep is not entered through a global firmware |
587 | or hardware operation. Instead, all hardware components are put into low-power | 594 | or hardware operation. Instead, all hardware components are put into low-power |
588 | states directly by the kernel in a coordinated way. Then, the system sleep | 595 | states directly by the kernel in a coordinated way. Then, the system sleep |
@@ -595,6 +602,20 @@ place (in particular, if the system is not waking up from hibernation), it may | |||
595 | be more efficient to leave the devices that had been suspended before the system | 602 | be more efficient to leave the devices that had been suspended before the system |
596 | suspend began in the suspended state. | 603 | suspend began in the suspended state. |
597 | 604 | ||
605 | The PM core does its best to reduce the probability of race conditions between | ||
606 | the runtime PM and system suspend/resume (and hibernation) callbacks by carrying | ||
607 | out the following operations: | ||
608 | |||
609 | * During system suspend it calls pm_runtime_get_noresume() and | ||
610 | pm_runtime_barrier() for every device right before executing the | ||
611 | subsystem-level .suspend() callback for it. In addition to that it calls | ||
612 | pm_runtime_disable() for every device right after executing the | ||
613 | subsystem-level .suspend() callback for it. | ||
614 | |||
615 | * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync() | ||
616 | for every device right before and right after executing the subsystem-level | ||
617 | .resume() callback for it, respectively. | ||
618 | |||
598 | 7. Generic subsystem callbacks | 619 | 7. Generic subsystem callbacks |
599 | 620 | ||
600 | Subsystems may wish to conserve code space by using the set of generic power | 621 | Subsystems may wish to conserve code space by using the set of generic power |