[linux-pm] [PATCH] apm-emulation: notify about all suspend events, not just apm invoked ones

Johannes Berg johannes at sipsolutions.net
Fri Mar 21 07:18:31 PDT 2008


Hi Pavel,

> > This revamps the apm-emulation code to get suspend notifications
> > regardless of what way pm_suspend() was invoked, whether via the
> > apm ioctl or via /sys/power/state. Also do some code cleanup and
> > add comments while at it.
> 
> Does this actually change user-kernel ABI?

Not ABI, but there is a change in behaviour (which is the whole point of
this patch). Previously, tools using /sys/power/state would live in one
sandbox and tools using APM in another, not knowing about each other but
both influencing the system suspend state. This makes them actually know
about each other by making the APM emulation indicate all system sleep
events, even those done via /sys/power/state and not the APM emulation
itself.


> > +enum apm_suspend_state {
> > +	SUSPEND_NONE,

> These are not passed to userspace, are they?

No, they're just for the internal state machine.

johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
Url : http://lists.linux-foundation.org/pipermail/linux-pm/attachments/20080321/875851b3/attachment.pgp 


More information about the linux-pm mailing list