Re: [PATCH 05/11] PM: Enable early suspend through /sys/power/state

Pavel Machek
2009-01-28T19:34:09Z

Hi!

> If EARLYSUSPEND is enabled then writes to /sys/power/state no longer
> blocks, and the kernel will try to enter the requested state every
> time no wakelocks are held. Write "on" to resume normal operation.

No, please don't break compatibility like this. You changed semantics
of 'mem'...

Just add another two states, for example "auto-mem" and
"auto-standby", and make them enter mem/standby when required.

Ok, you'll need "on", too... for canceling...

> @@ -388,6 +388,9 @@ static void suspend_finish(void)
>
>
> static const char * const pm_states[PM_SUSPEND_MAX] = {
> +#ifdef CONFIG_EARLYSUSPEND
> + [PM_SUSPEND_ON] = "on",
> +#endif
> [PM_SUSPEND_STANDBY] = "standby",
> [PM_SUSPEND_MEM] = "mem",
> };
> @@ -505,7 +508,11 @@ static ssize_t state_store(struct kobject
> *kobj, struct kobj_attribute *attr,

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html