HID: hid-input: Add eraser usage to hidinput_configure_usage
PATCH 1/1 HID: hid-input: Add eraser usage to hidinput_configure_usage
Some tablets report eraser usage to indicate the eraser tool tip is touching the surface. But, hidinput_configure_usage didn't support the usage, which led it falls into default as ABS_MISC.
Signed-off-by Ping Cheng <[email protected]>
--- drivers/hid/hid-input.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/hid/hid-input.c +9 -0
@@ -797,6 +797,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielmap_key_clear (BTN_STYLUS );break ; +case 0x45 :/* ERASER */ +/* +* This event is reported when eraser tip touches the surface. +* Actual eraser (BTN_TOOL_RUBBER) is set by Invert usage when +* tool gets in proximity. +*/ +map_key_clear (BTN_TOUCH ); +break ; +case 0x46 :/* TabletPick */ case 0x5a :/* SecondaryBarrelSwitch */ map_key_clear (BTN_STYLUS2 );
Signature · 1 line
2.13.6
Quoted 3 lines · Ping Cheng
Some tablets report eraser usage to indicate the eraser tool tip is touching the surface. But,
hidinput_configure_usagedidn't support the usage, which led it falls into default asABS_MISC.
Applied to for-4.15/upstream. Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs