mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
HID: add KEY_CAMERA_FOCUS event in HID
Our HID device need KEY_CAMERA_FOCUS event to control camera, but this event is non-existent in current HID driver. So we add this event in hid-input.c. Signed-off-by: fengqi <fengqi@xiaomi.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
2653e3fe33
commit
740b2f03f8
@ -1261,6 +1261,16 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
||||
return;
|
||||
}
|
||||
goto unknown;
|
||||
case HID_UP_CAMERA:
|
||||
switch (usage->hid & HID_USAGE) {
|
||||
case 0x020:
|
||||
map_key_clear(KEY_CAMERA_FOCUS); break;
|
||||
case 0x021:
|
||||
map_key_clear(KEY_CAMERA); break;
|
||||
default:
|
||||
goto ignore;
|
||||
}
|
||||
break;
|
||||
|
||||
case HID_UP_HPVENDOR: /* Reported on a Dutch layout HP5308 */
|
||||
set_bit(EV_REP, input->evbit);
|
||||
|
@ -156,6 +156,7 @@ struct hid_item {
|
||||
#define HID_UP_DIGITIZER 0x000d0000
|
||||
#define HID_UP_PID 0x000f0000
|
||||
#define HID_UP_BATTERY 0x00850000
|
||||
#define HID_UP_CAMERA 0x00900000
|
||||
#define HID_UP_HPVENDOR 0xff7f0000
|
||||
#define HID_UP_HPVENDOR2 0xff010000
|
||||
#define HID_UP_MSVENDOR 0xff000000
|
||||
|
Loading…
x
Reference in New Issue
Block a user