diff options
author | Arve Hjønnevåg <arve@android.com> | 2008-10-17 15:20:55 -0700 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-02-03 05:55:30 -0800 |
commit | 6bc5e3cc4858726819db7af65a6991c52c41f31c (patch) | |
tree | db741efdfae0c2ded0cd9af37d207c919ce8fb9a /include/linux | |
parent | 41b21130fd7c9ad2b241b3e6174f0c8e4ea111b7 (diff) |
Input: evdev - Add ioctl to block suspend while event queue is not empty.
Add an ioctl, EVIOCSSUSPENDBLOCK, to enable a wakelock that will block
suspend while the event queue is not empty. This allows userspace code to
process input events while the device appears to be asleep.
The current code holds the wakelock for up 5 seconds for every input
device and client. This can prevent suspend if sensor with a high data
rate is active, even when that sensor is not capable of waking the
device once it is suspended.
(cherry picked from commit 4dc43d7079bdae572212368e1d29abea0177c932 from
android.googlesource.com/common.git)
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I160d2afe77aa76c9d2bbe01cd4b81434201361a9
Reviewed-on: http://git-master/r/78895
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/input.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index a637e7814334..48857fddf9af 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -129,6 +129,9 @@ struct input_keymap_entry { #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ +#define EVIOCGSUSPENDBLOCK _IOR('E', 0x91, int) /* get suspend block enable */ +#define EVIOCSSUSPENDBLOCK _IOW('E', 0x91, int) /* set suspend block enable */ + /* * Device properties and quirks */ |