Skip to content

PM / Domains: Allow drivers to attach PM domain callbacks to devices at any time

Rafael J. Wysocki lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2PM / Domains: Add device domain data reference counterdrivers/base/power/domain.c include/linux/pm_domain.h+58 -260 replies
2/2PM / Domains: Allow device callbacks to be added at any timedrivers/base/power/domain.c+51 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] PM / Domains: Allow drivers to attach PM domain callbacks to devices at any time

Hi,

This is a follow-up of the discussion I had with Arnd and Magnus during the LCJ last month.

Namely, one of the limitations of the current generic PM domains code is that pm_genpd_add_callbacks() has to be executed after the device in question has been added to a PM domain. This means that, if a driver wants to run this routine from its .probe() callback, it cannot be registered before adding the device to the PM domain, which potentially may be a problem when device trees get involved into the system initialization.

For this reason, it is desirable to allow pm_genpd_add_callbacks() to be called for devices that haven't been added to any generic PM domains yet and the following patches attempt to make that happen.

[1/2] Add reference counter for objects used to store PM domains data related
to devices.
[2/2] Make it possible to call pm_genpd_add_callbacks() before the device is
added to a PM domain.

Thanks,
Rafael