aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-12-18 14:51:13 -0500
committerHenrik Rydberg <rydberg@euromail.se>2010-12-20 03:37:33 -0500
commit85b7720039fc000b561c20fe2aaa3b54cddae4a7 (patch)
tree8fee2c82e215b87699ad6615239752af50ac9310 /drivers/input/misc
parent4dd295a73e80b55c3fec25555bf0a5d253023740 (diff)
Input: introduce device properties
Today, userspace sets up an input device based on the data it emits. This is not always enough; a tablet and a touchscreen may emit exactly the same data, for instance, but the former should be set up with a pointer whereas the latter does not need to. Recently, a new type of touchpad has emerged where the buttons are under the pad, which changes logic without changing the emitted data. This patch introduces a new ioctl, EVIOCGPROP, which enables user access to a set of device properties useful during setup. The properties are given as a bitmap in the same fashion as the event types, and are also made available via sysfs, uevent and /proc/bus/input/devices. Acked-by: Ping Cheng <pingc@wacom.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/uinput.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index bea89722c4e9..82542a1c1098 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -680,6 +680,10 @@ static long uinput_ioctl_handler(struct file *file, unsigned int cmd,
680 retval = uinput_set_bit(arg, swbit, SW_MAX); 680 retval = uinput_set_bit(arg, swbit, SW_MAX);
681 break; 681 break;
682 682
683 case UI_SET_PROPBIT:
684 retval = uinput_set_bit(arg, propbit, INPUT_PROP_MAX);
685 break;
686
683 case UI_SET_PHYS: 687 case UI_SET_PHYS:
684 if (udev->state == UIST_CREATED) { 688 if (udev->state == UIST_CREATED) {
685 retval = -EINVAL; 689 retval = -EINVAL;