linux-kernel-test/drivers/base
Rafael J. Wysocki b86ff9820f PM / Sleep: Add user space interface for manipulating wakeup sources, v3
Android allows user space to manipulate wakelocks using two
sysfs file located in /sys/power/, wake_lock and wake_unlock.
Writing a wakelock name and optionally a timeout to the wake_lock
file causes the wakelock whose name was written to be acquired (it
is created before is necessary), optionally with the given timeout.
Writing the name of a wakelock to wake_unlock causes that wakelock
to be released.

Implement an analogous interface for user space using wakeup sources.
Add the /sys/power/wake_lock and /sys/power/wake_unlock files
allowing user space to create, activate and deactivate wakeup
sources, such that writing a name and optionally a timeout to
wake_lock causes the wakeup source of that name to be activated,
optionally with the given timeout.  If that wakeup source doesn't
exist, it will be created and then activated.  Writing a name to
wake_unlock causes the wakeup source of that name, if there is one,
to be deactivated.  Wakeup sources created with the help of
wake_lock that haven't been used for more than 5 minutes are garbage
collected and destroyed.  Moreover, there can be only WL_NUMBER_LIMIT
wakeup sources created with the help of wake_lock present at a time.

The data type used to track wakeup sources created by user space is
called "struct wakelock" to indicate the origins of this feature.

This version of the patch includes an rbtree manipulation fix from John Stultz.

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:26:05 +02:00
..
power PM / Sleep: Add user space interface for manipulating wakeup sources, v3 2012-05-01 21:26:05 +02:00
regmap regmap: A couple of small fixes for 3.4 2012-04-07 09:56:00 -07:00
attribute_container.c [SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init 2010-03-27 15:15:24 -04:00
base.h driver core: move the deferred probe pointer into the private area 2012-03-08 12:17:22 -08:00
bus.c Merge 3.3-rc2 into the driver-core-next branch. 2012-02-02 11:24:44 -08:00
class.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
core.c Core device tree changes for Linux v3.4 2012-03-21 10:30:03 -07:00
cpu.c Merge 3.3-rc6 into driver-core-next 2012-03-09 12:35:53 -08:00
dd.c driver core: minor comment formatting cleanups 2012-03-08 12:20:37 -08:00
devres.c devres: Fix a typo in devm_kfree comment 2011-12-21 00:31:47 +01:00
devtmpfs.c Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-01-08 12:19:57 -08:00
dma-buf.c dma-buf: add support for kernel cpu access 2012-03-26 11:33:02 +05:30
dma-coherent.c drivers/base: dma-coherent.c is a module and needs module.h 2011-10-31 19:31:38 -04:00
dma-mapping.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
driver.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-03-21 18:55:10 -07:00
firmware_class.c firmware_class: Move request_firmware_nowait() to workqueues 2012-03-28 23:31:00 +02:00
firmware.c
hypervisor.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
init.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
isa.c
Kconfig drivers/base: add bus for System-on-Chip devices 2012-02-10 11:42:25 -08:00
Makefile drivers/base: add bus for System-on-Chip devices 2012-02-10 11:42:25 -08:00
map.c
memory.c Linux 3.3-rc7 2012-03-14 07:44:11 +01:00
module.c driver core: module.c: Use kasprintf 2010-05-21 09:37:29 -07:00
node.c drivers/base/memory.c: fix memory_dev_init() long delay 2012-02-02 15:50:05 -08:00
platform.c drivercore: Output common devicetree information in uevent 2012-02-01 14:26:30 -07:00
soc.c drivers/base: fix compiler warning in SoC export driver - idr should be ida 2012-04-09 14:54:22 -07:00
syscore.c PM: Reintroduce dropped call to check_wakeup_irqs 2011-07-11 10:51:49 +02:00
topology.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
transport_class.c drivers/base: transport_class explicitly requires EXPORT_SYMBOL 2011-10-31 19:31:15 -04:00