History

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.

Benjamin Tissoires committed 8 years ago

Commit b875a5a1 parent 092150a2 files · +11 −10Browse files

Unified · Split

2 files
  1. Documentation/input/multi-touch-protocol.rst +6 −6
  2. include/uapi/linux/input.h +5 −4
Documentation/input/multi-touch-protocol.rst+6−6
@@ -310,12 +310,12 @@ ABS_MT_TOOL_Y · 309 unmodified lines
310310 ABS_MT_TOOL_TYPE
311311 The type of approaching tool. A lot of kernel drivers cannot distinguish
312312 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,
314− MT_TOOL_PEN, and MT_TOOL_PALM [#f2]_. For type B devices, this event is
315− handled by input core; drivers should instead use
316− input_mt_report_slot_state(). A contact's ABS_MT_TOOL_TYPE may change over
317− time while still touching the device, because the firmware may not be able
318− to determine which tool is being used when it first appears.
313+ event should be omitted. The protocol currently mainly supports
314+ MT_TOOL_FINGER, MT_TOOL_PEN, and MT_TOOL_PALM [#f2]_.
315+ For type B devices, this event is handled by input core; drivers should
316+ instead use input_mt_report_slot_state(). A contact's ABS_MT_TOOL_TYPE may
317+ change over time while still touching the device, because the firmware may
318+ not be able to determine which tool is being used when it first appears.
319319
320320 ABS_MT_BLOB_ID
321321 The BLOB_ID groups several packets together into one arbitrarily shaped
include/uapi/linux/input.h+5−4
@@ -270,10 +270,11 @@ struct input_mask { · 269 unmodified lines
270270 /*
271271 * MT_TOOL types
272272 */
273−#define MT_TOOL_FINGER 0
274−#define MT_TOOL_PEN 1
275−#define MT_TOOL_PALM 2
276−#define MT_TOOL_MAX 2
273+#define MT_TOOL_FINGER 0x00
274+#define MT_TOOL_PEN 0x01
275+#define MT_TOOL_PALM 0x02
276+#define MT_TOOL_DIAL 0x0a
277+#define MT_TOOL_MAX 0x0f
277278
278279 /*
279280 * Values describing the status of a force-feedback effect