Home
last modified time | relevance | path

Searched hist:"62 d44902" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/base/power/
H A Ddomain.c62d44902 Thu Jul 05 15:12:54 CDT 2012 Rafael J. Wysocki <rjw@sisk.pl> PM / Domains: Allow device callbacks to be added at any time

Make it possible to modify device callbacks used by the generic PM
domains core code at any time, not only after the device has been
added to a domain. This will allow device drivers to provide their
own device PM domain callbacks even if they are registered before
adding the devices to PM domains.

For this purpose, use the observation that the struct
generic_pm_domain_data object containing the relevant callback
pointers may be allocated by pm_genpd_add_callbacks() and the
callbacks may be set before __pm_genpd_add_device() is run for
the given device. This object will then be used by
__pm_genpd_add_device(), but it has to be protected from
premature removal by reference counting.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
62d44902 Thu Jul 05 15:12:54 CDT 2012 Rafael J. Wysocki <rjw@sisk.pl> PM / Domains: Allow device callbacks to be added at any time

Make it possible to modify device callbacks used by the generic PM
domains core code at any time, not only after the device has been
added to a domain. This will allow device drivers to provide their
own device PM domain callbacks even if they are registered before
adding the devices to PM domains.

For this purpose, use the observation that the struct
generic_pm_domain_data object containing the relevant callback
pointers may be allocated by pm_genpd_add_callbacks() and the
callbacks may be set before __pm_genpd_add_device() is run for
the given device. This object will then be used by
__pm_genpd_add_device(), but it has to be protected from
premature removal by reference counting.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>