alistair23-linux/kernel/power
Rafael J. Wysocki 7483b4a4d9 PM / Sleep: Implement opportunistic sleep, v2
Introduce a mechanism by which the kernel can trigger global
transitions to a sleep state chosen by user space if there are no
active wakeup sources.

It consists of a new sysfs attribute, /sys/power/autosleep, that
can be written one of the strings returned by reads from
/sys/power/state, an ordered workqueue and a work item carrying out
the "suspend" operations.  If a string representing the system's
sleep state is written to /sys/power/autosleep, the work item
triggering transitions to that state is queued up and it requeues
itself after every execution until user space writes "off" to
/sys/power/autosleep.

That work item enables the detection of wakeup events using the
functions already defined in drivers/base/power/wakeup.c (with one
small modification) and calls either pm_suspend(), or hibernate() to
put the system into a sleep state.  If a wakeup event is reported
while the transition is in progress, it will abort the transition and
the "system suspend" work item will be queued up again.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NeilBrown <neilb@suse.de>
2012-05-01 21:25:38 +02:00
..
autosleep.c PM / Sleep: Implement opportunistic sleep, v2 2012-05-01 21:25:38 +02:00
block_io.c block: kill off REQ_UNPLUG 2011-03-10 08:52:27 +01:00
console.c PM / VT: Cleanup #if defined uglyness and fix compile error 2011-10-16 23:28:51 +02:00
hibernate.c PM / Sleep: Move disabling of usermode helpers to the freezer 2012-03-28 23:30:21 +02:00
Kconfig PM / Sleep: Implement opportunistic sleep, v2 2012-05-01 21:25:38 +02:00
main.c PM / Sleep: Implement opportunistic sleep, v2 2012-05-01 21:25:38 +02:00
Makefile PM / Sleep: Implement opportunistic sleep, v2 2012-05-01 21:25:38 +02:00
power.h PM / Sleep: Implement opportunistic sleep, v2 2012-05-01 21:25:38 +02:00
poweroff.c
process.c PM / Sleep: Mitigate race between the freezer and request_firmware() 2012-03-28 23:30:28 +02:00
qos.c PM / QoS: add pm_qos_update_request_timeout() API 2012-03-28 23:31:24 +02:00
snapshot.c Power management updates for 3.4 2012-03-21 10:15:51 -07:00
suspend.c PM / Sleep: Move disabling of usermode helpers to the freezer 2012-03-28 23:30:21 +02:00
suspend_test.c
swap.c PM / Hibernate: Hibernate/thaw fixes/improvements 2012-05-01 21:24:15 +02:00
user.c PM / Sleep: Move disabling of usermode helpers to the freezer 2012-03-28 23:30:21 +02:00