From: Ping Cheng Date: Tue, 3 Oct 2017 22:05:41 +0000 (-0700) Subject: HID: hid-input: Add eraser usage to hidinput_configure_usage X-Git-Tag: v4.19~2198^2~2^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=654c192a72ffa7e415a9f58a4f4c5f4368b754e7;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 199f6a0..04d01b5 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -797,6 +797,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel map_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);