Thread (2 messages) 2 messages, 2 authors, 2017-09-22

[PATCH] HID: hid-input: Add eraser usage to hidinput_configure_usage

flat view
STALE3301d

From: Ping Cheng <hidden>
Date: 2017-09-21 22:37:53
Subsystem: hid core layer, the rest · Maintainers: Jiri Kosina, Benjamin Tissoires, Linus Torvalds

Some tablets report eraser usage to indicate the eraser tool. But,
hidinput_configure_usage doesn't support it, which led the usage
falls into default as ABS_MISC.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
---
 drivers/hid/hid-input.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 199f6a01fc62..4d36b08494fd 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -797,6 +797,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 			map_key_clear(BTN_STYLUS);
 			break;
 
+		case 0x45: /* ERASER */
+			map_key_clear(BTN_TOUCH);
+			break;
+
 		case 0x46: /* TabletPick */
 		case 0x5a: /* SecondaryBarrelSwitch */
 			map_key_clear(BTN_STYLUS2);
-- 
2.13.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help