On Saturday, 31. January 2009, Alan Stern wrote: > > Also, consider the case where the user presses the power button to go > > to sleep. Before this sleep request has finished a phone call comes > > in. The driver gets an interrupt, enqueues the message and locks a > > wakelock to make sure user-space gets a chance to process the message. > > If we ignore this wakelock, the phone will either not ring at all, or > > it will ring later when the device wakes up for some other reason. > > For situations like this, the driver can simply refuse to suspend. You > don't need to use a wakelock. > > In fact, if you did use a wakelock the behavior would be very strange. > The user presses the power button, an instant later a call comes in, > the device doesn't go to sleep, the user answers the call, and as soon > as he hangs up (perhaps 10 minutes later) the wakelock is released and > the device immediately goes to sleep! Not what the user would expect. Hi Alan, we have had a (userspace) wake-lock implementation on our handyPC devices for a couple of years now. So maybe I can shed some light. The above quote underlines pretty well, where Arve's and your ideas of eraly-suspend and wake-locks diverge. And why you are missunderstanding each other. Arve is always talking about "blanking the screen" because that's what the users sees. From the user's perspective the device is "suspended" as soon as his user interfaces vanishes. That's probably also why his notions of "suspend" and "wake" are not alway following a strict definition. If the device stays blanked while the user has his 10 min phone conversation, then he won't even notice wether the device suspends or not after the call. This is the idea. The user does not care for anything they can't see. Arve is not talking about a laptop that needs to sleep befor it's ventilation slot are covered. He is talking about a phone that could well do with only blanking it's screen. Except it want's to save battery when ever possible. Uli -- ------- ROAD ...the handyPC Company - - - ) ) ) Uli Luckas Head of Software Development ROAD GmbH Bennigsenstr. 14 | 12159 Berlin | Germany fon: +49 (30) 230069 - 62 | fax: +49 (30) 230069 - 69 url: www.road.de Amtsgericht Charlottenburg: HRB 96688 B Managing director: Hans-Peter Constien
Attachment:
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm