aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Gay <ogay@logitech.com>2014-10-17 19:53:39 -0400
committerJiri Kosina <jkosina@suse.cz>2014-10-20 15:03:58 -0400
commitf974008f07a62171a9dede08250c9a35c2b2b986 (patch)
treefbc858528dae8c9fce6739abd59a0ca819f343d8
parent1af39588f84c7c18f8c6d88342f36513a4ce383c (diff)
HID: add keyboard input assist hid usages
Add keyboard input assist controls usages from approved hid usage table request HUTTR42: http://www.usb.org/developers/hidpage/HUTRR42c.pdf Signed-off-by: Olivier Gay <ogay@logitech.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-debug.c6
-rw-r--r--drivers/hid/hid-input.c7
-rw-r--r--include/uapi/linux/input.h7
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 84c3cb15ccdd..8bf61d295ffd 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -946,6 +946,12 @@ static const char *keys[KEY_MAX + 1] = {
946 [KEY_BRIGHTNESS_MIN] = "BrightnessMin", 946 [KEY_BRIGHTNESS_MIN] = "BrightnessMin",
947 [KEY_BRIGHTNESS_MAX] = "BrightnessMax", 947 [KEY_BRIGHTNESS_MAX] = "BrightnessMax",
948 [KEY_BRIGHTNESS_AUTO] = "BrightnessAuto", 948 [KEY_BRIGHTNESS_AUTO] = "BrightnessAuto",
949 [KEY_KBDINPUTASSIST_PREV] = "KbdInputAssistPrev",
950 [KEY_KBDINPUTASSIST_NEXT] = "KbdInputAssistNext",
951 [KEY_KBDINPUTASSIST_PREVGROUP] = "KbdInputAssistPrevGroup",
952 [KEY_KBDINPUTASSIST_NEXTGROUP] = "KbdInputAssistNextGroup",
953 [KEY_KBDINPUTASSIST_ACCEPT] = "KbdInputAssistAccept",
954 [KEY_KBDINPUTASSIST_CANCEL] = "KbdInputAssistCancel",
949}; 955};
950 956
951static const char *relatives[REL_MAX + 1] = { 957static const char *relatives[REL_MAX + 1] = {
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 2df7fddbd119..56c6c30f2c7d 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -862,6 +862,13 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
862 case 0x28b: map_key_clear(KEY_FORWARDMAIL); break; 862 case 0x28b: map_key_clear(KEY_FORWARDMAIL); break;
863 case 0x28c: map_key_clear(KEY_SEND); break; 863 case 0x28c: map_key_clear(KEY_SEND); break;
864 864
865 case 0x2c7: map_key_clear(KEY_KBDINPUTASSIST_PREV); break;
866 case 0x2c8: map_key_clear(KEY_KBDINPUTASSIST_NEXT); break;
867 case 0x2c9: map_key_clear(KEY_KBDINPUTASSIST_PREVGROUP); break;
868 case 0x2ca: map_key_clear(KEY_KBDINPUTASSIST_NEXTGROUP); break;
869 case 0x2cb: map_key_clear(KEY_KBDINPUTASSIST_ACCEPT); break;
870 case 0x2cc: map_key_clear(KEY_KBDINPUTASSIST_CANCEL); break;
871
865 default: goto ignore; 872 default: goto ignore;
866 } 873 }
867 break; 874 break;
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index 1874ebe9ac1e..a1d7e931ab72 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -739,6 +739,13 @@ struct input_keymap_entry {
739#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ 739#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
740#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ 740#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
741 741
742#define KEY_KBDINPUTASSIST_PREV 0x260
743#define KEY_KBDINPUTASSIST_NEXT 0x261
744#define KEY_KBDINPUTASSIST_PREVGROUP 0x262
745#define KEY_KBDINPUTASSIST_NEXTGROUP 0x263
746#define KEY_KBDINPUTASSIST_ACCEPT 0x264
747#define KEY_KBDINPUTASSIST_CANCEL 0x265
748
742#define BTN_TRIGGER_HAPPY 0x2c0 749#define BTN_TRIGGER_HAPPY 0x2c0
743#define BTN_TRIGGER_HAPPY1 0x2c0 750#define BTN_TRIGGER_HAPPY1 0x2c0
744#define BTN_TRIGGER_HAPPY2 0x2c1 751#define BTN_TRIGGER_HAPPY2 0x2c1