Re: [RFC][PATCH 00/11] Android PM extensions

Nigel Cunningham
2009-01-14T09:01:21Z

Hi Arve.

On Tue, 2009-01-13 at 17:27 -0800, Arve Hjønnevåg wrote:
> The following patch series adds two apis, wakelock and earlysuspend.
> The Android platform uses the earlysuspend api to turn the screen
> and some input devices on and off. The wakelock code determines when
> to enter the full suspend state.
>
> These apis could also be useful to other platforms where the goal is
> to enter full suspend whenever possible.

A few general comments:

Would you be able to provide some more documentation? In particular, I'm
wondering what's 'early' about earlysuspend. It might also be good to
something to Documentation/power explaining what the apis are, when/how
they're supposed to be used and such like.

In the Kconfig files, I'm also missing the point to HAS_EARLYSUSPEND and
HAS_WAKELOCK - they're bools that depends only on and WAKELOCK
respectively, so shouldn't you be able to just use the later symbols in
ifdefs?

There are a few inlined #ifdefs (#ifdef CONFIG_WAKELOCK_STAT, eg) - the
convention as I understand it is to keep #ifdefs out of .c files as much
as possible, #ifdef'ing functions in header files instead.

Regards,

Nigel

_______________________________________________
linux-pm mailing list
linux-pm@lists.linux-foundation.org