lkml.org 
[lkml]   [2009]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-pm] Null suspend/resume functions
On Sun, Nov 22, 2009 at 12:45:10AM +0100, Pavel Machek wrote:

> So you place a comment there; it should be there anyway. Having nop
> during suspend/resume *is* unusual, and it should raise red flags.

This isn't a good assumption here. Remember that this is for runtime PM
so if we're getting as far as these calls then the driver has already
told the core that it is idle, which probably means that the hardware is
already quieseced. For a lot of hardware that will mean that the only
thing left to do in order to suspend is to (possibly) remove power and
in many cases (as with SH) that's going to be done by the bus rather
than the device. It's a bit more likely that some activity will be
needed on resume but in many cases the device gets fully reprogrammed on
when it becomes active anyway.

Looking at it another way a key goal of runtime PM is to get the bus
involved in the process - if we can do things at device level to reduce
power consumption then there's no need to go through runtime PM to do
them.

> Plus, if we allowed NULLs there, we'd not know if the driver does not
> implement it because it is not neccessary, or because they don't care.

Again, in order to use runtime PM the driver must already be doing
explicit calls so it should be fairly clear that the driver is trying to
support suspend.


\
 
 \ /
  Last update: 2009-11-23 12:05    [W:0.074 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site