OSDN Git Service

Input: evdev - Add ioctl to block suspend while event queue is not empty.
authorArve Hjønnevåg <arve@android.com>
Fri, 17 Oct 2008 22:20:55 +0000 (15:20 -0700)
committerArve Hjønnevåg <arve@android.com>
Wed, 1 Feb 2012 00:00:27 +0000 (16:00 -0800)
commit4dc43d7079bdae572212368e1d29abea0177c932
treee90fe6499effc6032295bef0eeadd3b41294c28f
parent7cc846069a8a9116d8c81526c459070eed0e3477
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.

Change-Id: I624d66ef30a0b3abb543685c343382b8419b42b9
Signed-off-by: Arve Hjønnevåg <arve@android.com>
drivers/input/evdev.c
include/linux/input.h