linux/include
Caesar Wang 2f76476339 ANDROID: input: Add "inhibited" property for input devices
Under certain circumstances, we want to disable some input
devices from userspace. In particular, when we detect that the lid of a
laptop is closed, we want to be able to disable touchpad and
touchscreen to avoid bogus input.

To facilitate this, we introduce the "inhibited" sysfs property for
input devices. Using this property, userspace can tell a driver that the
events it can provide are not currently of interest and should be
ignored. We provide hooks so that the driver can take additional
actions, such as powering down the device.

We deliberately keep this limited to input devices for now to keep the
implementation as straightforward as possible.

(cherry-pick from: https://chromium-review.googlesource.com/207989)

verify that touchpad works
echo 1 > /sys/bus/i2c/drivers/elan_i2c/4-0015/input/input0/inhibited
touchpad stops working
echo 0 >  /sys/bus/i2c/drivers/elan_i2c/4-0015/input/input0/inhibited
touchpad works again

Signed-off-by: Patrik Fimml <patrikf@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207989
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>

Change-Id: I889d37ef7ffc49f3c073b1c283d5c3327c263b7f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2015-09-01 11:11:46 +08:00
..
acpi ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address. 2015-05-17 09:51:33 -07:00
asm-generic Merge tag 'lsk-v3.10-15.05-android' into develop-3.10 2015-06-02 11:25:34 +08:00
clocksource Merge remote-tracking branch 'lsk/v3.10/topic/mm-timer' into linux-linaro-lsk 2014-06-13 20:59:53 +01:00
crypto crypto: allow blkcipher walks over AEAD data 2014-08-28 10:22:27 -07:00
drm LSK Android 14.11 v3.10 2014-12-05 21:18:34 +08:00
dt-bindings rk fb: add YUV420 10bit output mode for next soc 2015-07-24 15:27:28 +08:00
keys
kvm arm/arm64: KVM: vgic: delay vgic allocation until init time 2014-10-02 17:19:23 +02:00
linux ANDROID: input: Add "inhibited" property for input devices 2015-09-01 11:11:46 +08:00
math-emu
media Merge branch 'rk_develop-3.10' into rk_develop-3.10-next 2015-03-19 16:42:17 +08:00
memory
misc
net net: ping: fix constness inconsistency in ipv6_chk_addr 2015-03-16 15:23:53 -07:00
pcmcia
ras
rdma
rxrpc
scsi scsi: fix our current target reap infrastructure 2014-05-30 21:52:11 -07:00
sound Merge tag 'lsk-v3.10-15.05-android' into develop-3.10 2015-06-02 11:25:34 +08:00
target target: Report correct response length for some commands 2014-06-30 20:09:45 -07:00
trace LSK Android 14.11 v3.10 2014-12-05 21:18:34 +08:00
uapi usb: gadget: mtp: add new ioctl for compat 2015-05-05 17:30:12 +08:00
video rk fb: add lut for CABC 2015-03-24 19:03:13 +08:00
xen
Kbuild