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>
This commit is contained in:
parent
f01c5e652c
commit
052876f8e5
3 changed files with 168 additions and 6 deletions
|
@ -20,6 +20,11 @@
|
|||
* Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
|
||||
*
|
||||
* Changes/Revisions:
|
||||
* 0.5 08/13/2015 (David Herrmann <dh.herrmann@gmail.com> &
|
||||
* Benjamin Tissoires <benjamin.tissoires@redhat.com>)
|
||||
* - add UI_DEV_SETUP ioctl
|
||||
* - add UI_ABS_SETUP ioctl
|
||||
* - add UI_GET_VERSION ioctl
|
||||
* 0.4 01/09/2014 (Benjamin Tissoires <benjamin.tissoires@redhat.com>)
|
||||
* - add UI_GET_SYSNAME ioctl
|
||||
* 0.3 24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue