aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2018-07-13 10:13:43 -0400
committerJiri Kosina <jkosina@suse.cz>2018-07-17 09:33:47 -0400
commitb875a5a529bedf73532000f4e2496c00a00f4765 (patch)
tree5d21ab839b834c310aeb81983cc33f80c6c558e1
parent092150a25cb7bd6a79aa00bb1ad131063f58073d (diff)
input: add MT_TOOL_DIAL
A dial is a tool you place on a multitouch surface which reports its orientation or a relative angle of rotation when rotating its knob. Some examples are the Dell Totem (on the Canvas 27"), the Microsoft Dial, or the Griffin Powermate, though the later can't be put on a touch surface. We give some extra space to account for other types of fingers if we need (MT_TOOL_THUMB) Slightly change the documentation to not make it mandatory to update each MT_TOOL we add. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--Documentation/input/multi-touch-protocol.rst12
-rw-r--r--include/uapi/linux/input.h9
2 files changed, 11 insertions, 10 deletions
diff --git a/Documentation/input/multi-touch-protocol.rst b/Documentation/input/multi-touch-protocol.rst
index b51751a0cd5d..6be70342e709 100644
--- a/Documentation/input/multi-touch-protocol.rst
+++ b/Documentation/input/multi-touch-protocol.rst
@@ -310,12 +310,12 @@ ABS_MT_TOOL_Y
310ABS_MT_TOOL_TYPE 310ABS_MT_TOOL_TYPE
311 The type of approaching tool. A lot of kernel drivers cannot distinguish 311 The type of approaching tool. A lot of kernel drivers cannot distinguish
312 between different tool types, such as a finger or a pen. In such cases, the 312 between different tool types, such as a finger or a pen. In such cases, the
313 event should be omitted. The protocol currently supports MT_TOOL_FINGER, 313 event should be omitted. The protocol currently mainly supports
314 MT_TOOL_PEN, and MT_TOOL_PALM [#f2]_. For type B devices, this event is 314 MT_TOOL_FINGER, MT_TOOL_PEN, and MT_TOOL_PALM [#f2]_.
315 handled by input core; drivers should instead use 315 For type B devices, this event is handled by input core; drivers should
316 input_mt_report_slot_state(). A contact's ABS_MT_TOOL_TYPE may change over 316 instead use input_mt_report_slot_state(). A contact's ABS_MT_TOOL_TYPE may
317 time while still touching the device, because the firmware may not be able 317 change over time while still touching the device, because the firmware may
318 to determine which tool is being used when it first appears. 318 not be able to determine which tool is being used when it first appears.
319 319
320ABS_MT_BLOB_ID 320ABS_MT_BLOB_ID
321 The BLOB_ID groups several packets together into one arbitrarily shaped 321 The BLOB_ID groups several packets together into one arbitrarily shaped
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index 7288a7c573cc..fb78f6f500f3 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -270,10 +270,11 @@ struct input_mask {
270/* 270/*
271 * MT_TOOL types 271 * MT_TOOL types
272 */ 272 */
273#define MT_TOOL_FINGER 0 273#define MT_TOOL_FINGER 0x00
274#define MT_TOOL_PEN 1 274#define MT_TOOL_PEN 0x01
275#define MT_TOOL_PALM 2 275#define MT_TOOL_PALM 0x02
276#define MT_TOOL_MAX 2 276#define MT_TOOL_DIAL 0x0a
277#define MT_TOOL_MAX 0x0f
277 278
278/* 279/*
279 * Values describing the status of a force-feedback effect 280 * Values describing the status of a force-feedback effect