On Thu, Nov 19, 2009 at 1:13 AM, Enrico Zini <[email protected]> wrote: > Hello, > > I am investigating pm-utils as the glue to tie together suspend/resume > machinery on the OpenMoko FreeRunner. > > One thing that is needed, and that I didn't manage to understand if it > could be done with pm-utils, is to cancel a resume. > > There are various reasons why the phone can be set to resume: user > request, receiving a phone call, a change of the fix on the GPS, a > timer, an inbound GPRS data packet, possibly more. > > Not all of those events require the phone to fully unsuspend, turn on > screen and so on and so forth. In the case of a GPS fix change, for > example, the only thing needed would be to append some data to a GPX > track log, then one can go to sleep again. > > It is possible to inspect the resume reason upon resume, so pm-utils > scripts could check that, then decide if a full resume is needed or if > the resume reason can be handled right away and then return to sleep. > > Is it possible for a resume script in pm-utils to say "Ok, I took care > of it, don't bother running the rest, let's go back to sleep" ?
The bulk of the resume is handed in the kernel. pm-utils just adds a little bit on top to pull it all together and has nothing to do with actually resuming the hardware. If you really need to block a resume, it should happen in the kernel. You could write a hook that immediately suspends again, but it would be a pretty nasty user experience. -- Dan _______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
