Commit-ID: 50b6369767f65c39de3d7ca17842ebc6c52888b8 Gitweb: http://git.kernel.org/tip/50b6369767f65c39de3d7ca17842ebc6c52888b8 Author: Nikolai Kondrashov <spbnick@xxxxxxxxx> AuthorDate: Fri, 6 Aug 2010 23:03:07 +0400 Committer: Jiri Kosina <jkosina@xxxxxxx> CommitDate: Mon, 9 Aug 2010 19:52:43 +0200 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@xxxxxxxxx> Signed-off-by: Jiri Kosina <jkosina@xxxxxxx> --- drivers/hid/hid-input.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 6c03dcc..0c2908f 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 map_key_clear(BTN_STYLUS); break; + case 0x46: /* TabletPick */ + map_key_clear(BTN_STYLUS2); + break; + default: goto unknown; } break; -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html