summaryrefslogtreecommitdiff
path: root/kernel/power/Kconfig
diff options
context:
space:
mode:
author=?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>2011-10-25 11:30:06 +0800
committerAndy Green <andy.green@linaro.org>2011-10-25 11:30:06 +0800
commit0b5fdee09cd6053059cf2dcccdf71caf1b326e37 (patch)
tree2a8c5458aea49808c246fc41a5c1851e0e744560 /kernel/power/Kconfig
parentcffb5030769f3061d5b9b746547ec3e5012ffd7e (diff)
PM: Add user-space wake lock api.
This adds /sys/power/wake_lock and /sys/power/wake_unlock. Writing a string to wake_lock creates a wake lock the first time is sees a string and locks it. Optionally, the string can be followed by a timeout. To unlock the wake lock, write the same string to wake_unlock. Change-Id: I66c6e3fe6487d17f9c2fafde1174042e57d15cd7
Diffstat (limited to 'kernel/power/Kconfig')
-rw-r--r--kernel/power/Kconfig10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 06b41d8ea86..a135db5a1c1 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -40,6 +40,16 @@ config WAKELOCK_STAT
---help---
Report wake lock stats in /proc/wakelocks
+config USER_WAKELOCK
+ bool "Userspace wake locks"
+ depends on WAKELOCK
+ default y
+ ---help---
+ User-space wake lock api. Write "lockname" or "lockname timeout"
+ to /sys/power/wake_lock lock and if needed create a wake lock.
+ Write "lockname" to /sys/power/wake_unlock to unlock a user wake
+ lock.
+
config EARLYSUSPEND
bool "Early suspend"
depends on WAKELOCK