aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2010-08-06 15:03:07 -0400
committerJiri Kosina <jkosina@suse.cz>2010-08-09 13:52:43 -0400
commit50b6369767f65c39de3d7ca17842ebc6c52888b8 (patch)
tree00c998fa9eceb17ab850130e1f455d6fcb8440bf /drivers/hid/hid-input.c
parent73e4008ddddc84d5f2499c17012b340a0dae153e (diff)
HID: Add Tablet Pick -> BTN_STYLUS2 mapping
Many tablet input drivers use BTN_STYLUS2 code to report a second tablet stylus button. Yet, the generic HID input driver doesn't map it. Apparently, because there is no corresponding usage in the HID Usage Tables. This patch selects a compromise usage - "Tablet Pick" (0x46) to be mapped to BTN_STYLUS2. Some tablets use "Eraser" usage, but mapping it to a button wouldn't be entirely correct, because the specification says it may be "a pressure quantity". Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 6c03dcc5760a..0c2908f2dbe3 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -336,6 +336,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
336 map_key_clear(BTN_STYLUS); 336 map_key_clear(BTN_STYLUS);
337 break; 337 break;
338 338
339 case 0x46: /* TabletPick */
340 map_key_clear(BTN_STYLUS2);
341 break;
342
339 default: goto unknown; 343 default: goto unknown;
340 } 344 }
341 break; 345 break;