Skip to content

Commit 63f7cf6

Browse files
author
Jiri Kosina
committed
Merge branch 'for-6.4/core' into for-linus
- improve handling of generic "Digitizer" usage (Jason Gerecke) - support for KEY_CAMERA_FOCUS (Feng Qi)
2 parents 5f86a08 + 3590300 commit 63f7cf6

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@
415415
#define I2C_DEVICE_ID_HP_SPECTRE_X360_15 0x2817
416416
#define I2C_DEVICE_ID_HP_SPECTRE_X360_13_AW0020NG 0x29DF
417417
#define I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN 0x2BC8
418+
#define I2C_DEVICE_ID_ASUS_GV301RA_TOUCHSCREEN 0x2C82
418419
#define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544
419420
#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706
420421
#define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN 0x261A

drivers/hid/hid-input.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
372372
HID_BATTERY_QUIRK_IGNORE },
373373
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN),
374374
HID_BATTERY_QUIRK_IGNORE },
375+
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_ASUS_GV301RA_TOUCHSCREEN),
376+
HID_BATTERY_QUIRK_IGNORE },
375377
{ HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN),
376378
HID_BATTERY_QUIRK_IGNORE },
377379
{ HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN),
@@ -1267,6 +1269,16 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
12671269
return;
12681270
}
12691271
goto unknown;
1272+
case HID_UP_CAMERA:
1273+
switch (usage->hid & HID_USAGE) {
1274+
case 0x020:
1275+
map_key_clear(KEY_CAMERA_FOCUS); break;
1276+
case 0x021:
1277+
map_key_clear(KEY_CAMERA); break;
1278+
default:
1279+
goto ignore;
1280+
}
1281+
break;
12701282

12711283
case HID_UP_HPVENDOR: /* Reported on a Dutch layout HP5308 */
12721284
set_bit(EV_REP, input->evbit);

include/linux/hid.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ struct hid_item {
156156
#define HID_UP_DIGITIZER 0x000d0000
157157
#define HID_UP_PID 0x000f0000
158158
#define HID_UP_BATTERY 0x00850000
159+
#define HID_UP_CAMERA 0x00900000
159160
#define HID_UP_HPVENDOR 0xff7f0000
160161
#define HID_UP_HPVENDOR2 0xff010000
161162
#define HID_UP_MSVENDOR 0xff000000
@@ -873,7 +874,7 @@ extern bool hid_is_usb(const struct hid_device *hdev);
873874
/* We ignore a few input applications that are not widely used */
874875
#define IS_INPUT_APPLICATION(a) \
875876
(((a >= HID_UP_GENDESK) && (a <= HID_GD_MULTIAXIS)) \
876-
|| ((a >= HID_DG_PEN) && (a <= HID_DG_WHITEBOARD)) \
877+
|| ((a >= HID_DG_DIGITIZER) && (a <= HID_DG_WHITEBOARD)) \
877878
|| (a == HID_GD_SYSTEM_CONTROL) || (a == HID_CP_CONSUMER_CONTROL) \
878879
|| (a == HID_GD_WIRELESS_RADIO_CTLS))
879880

0 commit comments

Comments
 (0)