]> Git Repo - linux.git/commitdiff
HID: wacom: Hardcode (non-inverted) AES pens as BTN_TOOL_PEN
authorJason Gerecke <[email protected]>
Wed, 9 Oct 2024 16:41:21 +0000 (09:41 -0700)
committerJiri Kosina <[email protected]>
Fri, 11 Oct 2024 09:12:19 +0000 (11:12 +0200)
Unlike EMR tools which encode type information in their tool ID, tools
for AES sensors are all "generic pens". It is inappropriate to make use
of the wacom_intuos_get_tool_type function when dealing with these kinds
of devices. Instead, we should only ever report BTN_TOOL_PEN or
BTN_TOOL_RUBBER, as depending on the state of the Eraser and Invert
bits.

Reported-by: Daniel Jutz <[email protected]>
Closes: https://lore.kernel.org/linux-input/[email protected]/
Bisected-by: Christian Heusel <[email protected]>
Fixes: 9c2913b962da ("HID: wacom: more appropriate tool type categorization")
Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1041
Link: https://github.com/linuxwacom/input-wacom/issues/440
Signed-off-by: Jason Gerecke <[email protected]>
Cc: [email protected]
Acked-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
drivers/hid/wacom_wac.c

index 59a13ad9371cd74da0c8bb7d501e5a8c73bb7409..413606bdf476df96ae6b4d6380fd8c4cad262858 100644 (file)
@@ -2567,6 +2567,8 @@ static void wacom_wac_pen_report(struct hid_device *hdev,
                /* Going into range select tool */
                if (wacom_wac->hid_data.invert_state)
                        wacom_wac->tool[0] = BTN_TOOL_RUBBER;
+               else if (wacom_wac->features.quirks & WACOM_QUIRK_AESPEN)
+                       wacom_wac->tool[0] = BTN_TOOL_PEN;
                else if (wacom_wac->id[0])
                        wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]);
                else
This page took 0.056514 seconds and 4 git commands to generate.