Thread (1 message) 1 message, 1 author, 2011-06-07

Re: calling runtime PM from system PM methods

From: Kevin Hilman <hidden>
Date: 2011-06-07 22:34:50

"Rafael J. Wysocki" [off-list ref] writes:
On Tuesday, June 07, 2011, Kevin Hilman wrote:
quoted
"Rafael J. Wysocki" [off-list ref] writes:

[..]
quoted
While it is tempting to try to get away with only two PM callbacks per
driver instead of four (or even more), it generally is not doable, simply
because driver callbacks are not executed directly by the core.

The only way to address the problem of code duplication between .suspend()
and .runtime_suspend() callbacks (and analogously for resume) I see at the
moment is to make those callbacks execute common routines.
Makes sense if the "common routines" are in the driver.  The problem
arises when the common routines are not actually in the driver, but are
instead at the subsystem (or in this case, device power domain) level.
As Alan said, I'm not sure why that is a problem, because device power
domain can (and most likely should) provide system suspend callbacks as well
as runtime PM callbacks.  Those callbacks can be designed to do whatever is
needed.
Yes, I see now.

For some reason, my runtime PM focus caused me to not consider the
system PM callbacks in the device power domains.  Taking care of things
there should solve my problems.

Sorry for being a bit blind,

Kevin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help