[PATCH] HID: Accept Digitizers as input devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit f7d8e387d9ae ("HID: uclogic: Switch to Digitizer usage for
styluses") broke input from my XP-Pen Star G640. This is because the
"Digitizer" usage is not recognized as a valid usage for input devices.

This patch changes the IS_INPUT_APPLICATION macro so that the "Digitizer"
(HID_DG_DIGITIZER) usage is recognized as an input device usage.

Fixes: f7d8e387d9ae ("HID: uclogic: Switch to Digitizer usage for styluses")
Signed-off-by: Torge Matthies <openglfreak@xxxxxxxxxxxxxx>
---
This patch could be risky, because any digitizer devices that were
previously not treated as input devices are now used for input.
Alternatively the linked commit could be reverted, but that would
re-introduce the problem detailed in its commit message.

 include/linux/hid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/hid.h b/include/linux/hid.h
index 4363a63b9775..07803e144d98 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -883,7 +883,7 @@ static inline bool hid_is_usb(struct hid_device *hdev)
 /* We ignore a few input applications that are not widely used */
 #define IS_INPUT_APPLICATION(a) \
 		(((a >= HID_UP_GENDESK) && (a <= HID_GD_MULTIAXIS)) \
-		|| ((a >= HID_DG_PEN) && (a <= HID_DG_WHITEBOARD)) \
+		|| ((a >= HID_DG_DIGITIZER) && (a <= HID_DG_WHITEBOARD)) \
 		|| (a == HID_GD_SYSTEM_CONTROL) || (a == HID_CP_CONSUMER_CONTROL) \
 		|| (a == HID_GD_WIRELESS_RADIO_CTLS))
 
-- 
2.37.1




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux