Skip to content

Commit 4ec4f05

Browse files
storulfrafaeljw
authored andcommitted
PM: runtime: Clarify documentation when callbacks are unassigned
Recent changes to the PM core allows ->runtime_suspend|resume callbacks to be unassigned. In the earlier behaviour the PM core would return -ENOSYS, when trying to runtime resume a device, for example. Let's update the documentation to clarify this. Signed-off-by: Ulf Hansson <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 63d00be commit 4ec4f05

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Documentation/power/runtime_pm.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,15 @@ or driver about runtime power changes. Instead, the driver for the device's
831831
parent must take responsibility for telling the device's driver when the
832832
parent's power state changes.
833833

834+
Note that, in some cases it may not be desirable for subsystems/drivers to call
835+
pm_runtime_no_callbacks() for their devices. This could be because a subset of
836+
the runtime PM callbacks needs to be implemented, a platform dependent PM
837+
domain could get attached to the device or that the device is power managed
838+
through a supplier device link. For these reasons and to avoid boilerplate code
839+
in subsystems/drivers, the PM core allows runtime PM callbacks to be
840+
unassigned. More precisely, if a callback pointer is NULL, the PM core will act
841+
as though there was a callback and it returned 0.
842+
834843
9. Autosuspend, or automatically-delayed suspends
835844
=================================================
836845

0 commit comments

Comments
 (0)