On Fri 2009-01-30 19:13:32, Arve Hj?nnev?g wrote: > On Wed, Jan 28, 2009 at 11:34 AM, Pavel Machek <pavel@xxxxxx> wrote: > > 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. > > > > What would you want to happen if someone writes "mem"? If we just call > enter_state, it will fail and return an error if a wakelock is > locked. That would be fine. And ignoring wakelocks in this case would be even better. > We can call request_suspend_state and then wait for another thread to > write "on", but this still requires user-space changes to work > correctly. If the goal is to allow the kernel to be compiled with > wakelock and early suspend support while preserving the old behaviour > if wakelocks are not used, then the first option is better. Yes, goal is that compiling in wakelock / early suspend support has no effect on existing functionality. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm