Skip to content

Commit 2934b12

Browse files
jigpuJiri Kosina
authored andcommitted
HID: wacom: Hardcode (non-inverted) AES pens as BTN_TOOL_PEN
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: 9c2913b ("HID: wacom: more appropriate tool type categorization") Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1041 Link: linuxwacom/input-wacom#440 Signed-off-by: Jason Gerecke <[email protected]> Cc: [email protected] Acked-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent c56f9ec commit 2934b12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/hid/wacom_wac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2567,6 +2567,8 @@ static void wacom_wac_pen_report(struct hid_device *hdev,
25672567
/* Going into range select tool */
25682568
if (wacom_wac->hid_data.invert_state)
25692569
wacom_wac->tool[0] = BTN_TOOL_RUBBER;
2570+
else if (wacom_wac->features.quirks & WACOM_QUIRK_AESPEN)
2571+
wacom_wac->tool[0] = BTN_TOOL_PEN;
25702572
else if (wacom_wac->id[0])
25712573
wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]);
25722574
else

0 commit comments

Comments
 (0)