diff options
author | Ping Cheng <pinglinux@gmail.com> | 2017-10-03 15:05:41 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-10-05 11:20:12 +0200 |
commit | 654c192a72ffa7e415a9f58a4f4c5f4368b754e7 (patch) | |
tree | 9c4d81150c6b8758aa466a031578762819a6c596 /drivers/hid/hid-input.c | |
parent | fc5431dc06d442828c8f92fb913257f7df3079aa (diff) | |
download | linux-stable-654c192a72ffa7e415a9f58a4f4c5f4368b754e7.tar.gz linux-stable-654c192a72ffa7e415a9f58a4f4c5f4368b754e7.tar.bz2 linux-stable-654c192a72ffa7e415a9f58a4f4c5f4368b754e7.zip |
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 <ping.cheng@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 199f6a01fc62..04d01b57d94c 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); |