Commit 929578ab0339fe42bb3ceeaa2e6607189cddf70b
Committed by
Jiri Kosina
1 parent
25976a796c
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
HID: Add suport for the brightness control keys on HP keyboards
The keys are found on the keyboards bundled with HP All-In-One machines with USB VID/PID of 04ca:004d and 04f2:1061. Signed-off-by: Keng-Yu Lin <kengyu@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Showing 2 changed files with 10 additions and 0 deletions Side-by-side Diff
drivers/hid/hid-input.c
... | ... | @@ -834,6 +834,15 @@ |
834 | 834 | } |
835 | 835 | break; |
836 | 836 | |
837 | + case HID_UP_HPVENDOR2: | |
838 | + set_bit(EV_REP, input->evbit); | |
839 | + switch (usage->hid & HID_USAGE) { | |
840 | + case 0x003: map_key_clear(KEY_BRIGHTNESSDOWN); break; | |
841 | + case 0x004: map_key_clear(KEY_BRIGHTNESSUP); break; | |
842 | + default: goto ignore; | |
843 | + } | |
844 | + break; | |
845 | + | |
837 | 846 | case HID_UP_MSVENDOR: |
838 | 847 | goto ignore; |
839 | 848 |
include/linux/hid.h
... | ... | @@ -200,6 +200,7 @@ |
200 | 200 | #define HID_UP_DIGITIZER 0x000d0000 |
201 | 201 | #define HID_UP_PID 0x000f0000 |
202 | 202 | #define HID_UP_HPVENDOR 0xff7f0000 |
203 | +#define HID_UP_HPVENDOR2 0xff010000 | |
203 | 204 | #define HID_UP_MSVENDOR 0xff000000 |
204 | 205 | #define HID_UP_CUSTOM 0x00ff0000 |
205 | 206 | #define HID_UP_LOGIVENDOR 0xffbc0000 |