summaryrefslogtreecommitdiffstats
path: root/include/linux/uinput.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2015-12-18 20:20:09 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-12-18 20:48:50 -0500
commit052876f8e5aec887d22c4d06e54aa5531ffcec75 (patch)
tree4327b502de0d11288b69a48fbf4a4e529949a6e0 /include/linux/uinput.h
parentf01c5e652ca949722a7fe4cfdecd73e8026971d2 (diff)
Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl
This adds two new ioctls, UINPUT_DEV_SETUP and UI_ABS_SETUP, that replaces the old device setup method (by write()'ing "struct uinput_user_dev" to the node). The old method is not easily extendable and requires huge payloads. Furthermore, overloading write() without properly versioned objects is error-prone. Therefore, we introduce two new ioctls to replace the old method. These ioctls support all features of the old method, plus a "resolution" field for absinfo. Furthermore, it's properly forward-compatible to new ABS codes and a growing "struct input_absinfo" structure. UI_ABS_SETUP also allows user-space to skip unknown axes if not set. There is no need to copy the whole array temporarily into the kernel, but instead the caller issues several ioctl where we copy each value manually. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/uinput.h')
-rw-r--r--include/linux/uinput.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/uinput.h b/include/linux/uinput.h
index 0994c0d01a09..75de43da2301 100644
--- a/include/linux/uinput.h
+++ b/include/linux/uinput.h
@@ -20,6 +20,11 @@
20 * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> 20 * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
21 * 21 *
22 * Changes/Revisions: 22 * Changes/Revisions:
23 * 0.5 08/13/2015 (David Herrmann <dh.herrmann@gmail.com> &
24 * Benjamin Tissoires <benjamin.tissoires@redhat.com>)
25 * - add UI_DEV_SETUP ioctl
26 * - add UI_ABS_SETUP ioctl
27 * - add UI_GET_VERSION ioctl
23 * 0.4 01/09/2014 (Benjamin Tissoires <benjamin.tissoires@redhat.com>) 28 * 0.4 01/09/2014 (Benjamin Tissoires <benjamin.tissoires@redhat.com>)
24 * - add UI_GET_SYSNAME ioctl 29 * - add UI_GET_SYSNAME ioctl
25 * 0.3 24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>) 30 * 0.3 24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>)