Re: [RFC PATCH v2 1/3] PM / Core: suspend_again callback fordevice PM.

From: Pavel Machek
Date: Tue Apr 26 2011 - 18:14:28 EST


Hi!

> > > What is the root problem that this is trying to solve?
> >
> > It is trying to fix machines that need to run periodic kernel tasks
> > even when user asked them to sleep. Zaurus needs to periodicaly wake
> > up to be able to charge battery in s2ram state, for example.
>
> That sounds like a bug in userspace you are trying to work around. Why
> not solve it there first?

Can you be more specific?

The userspace is standard Debian; or maybe even init=/bin/bash. I want
to sleep the machine before I move, so I do echo mem >
/sys/power/state, as I do on PC.

Then I do plug the machine into AC when I move near outlet. In PC,
embedded controller wakes up and starts charging. In Zaurus, it is
kernel (SPI+charging drivers) that wake up, start charging, and go
back to sleep.

Then I (the user) press the power button and get "bash#" back. Where
is the userspace bug?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/