Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM / Runtime: Update documentation around probe|remove|suspend

PM core and driver core has changed some behavior regarding use of
runtime PM. Update the documentation accordingly.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Ulf Hansson and committed by
Rafael J. Wysocki
ea309944 baab52de

+6 -8
+6 -8
Documentation/power/runtime_pm.txt
··· 547 547 should be used. Of course, for this purpose the device's runtime PM has to be 548 548 enabled earlier by calling pm_runtime_enable(). 549 549 550 - If the device bus type's or driver's ->probe() callback runs 551 - pm_runtime_suspend() or pm_runtime_idle() or their asynchronous counterparts, 552 - they will fail returning -EAGAIN, because the device's usage counter is 553 - incremented by the driver core before executing ->probe(). Still, it may be 554 - desirable to suspend the device as soon as ->probe() has finished, so the driver 555 - core uses pm_runtime_put_sync() to invoke the subsystem-level idle callback for 556 - the device at that time. 550 + It may be desirable to suspend the device once ->probe() has finished. 551 + Therefore the driver core uses the asyncronous pm_request_idle() to submit a 552 + request to execute the subsystem-level idle callback for the device at that 553 + time. A driver that makes use of the runtime autosuspend feature, may want to 554 + update the last busy mark before returning from ->probe(). 557 555 558 556 Moreover, the driver core prevents runtime PM callbacks from racing with the bus 559 557 notifier callback in __device_release_driver(), which is necessary, because the ··· 654 656 __pm_runtime_disable() with 'false' as the second argument for every device 655 657 right before executing the subsystem-level .suspend_late() callback for it. 656 658 657 - * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync() 659 + * During system resume it calls pm_runtime_enable() and pm_runtime_put() 658 660 for every device right after executing the subsystem-level .resume_early() 659 661 callback and right after executing the subsystem-level .resume() callback 660 662 for it, respectively.