Commit 79b95d74 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'hid-for-linus-2026010801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID fixes from Jiri Kosina:

 - build fix for HID-BPF (Benjamin Tissoires)

 - fix for potential buffer overflow in i2c-hid (Kwok Kin Ming)

 - a couple of selftests/hid fixes (Peter Hutterer)

 - fix for handling pressure pads in hid-multitouch (Peter Hutterer)

 - fix for potential NULL pointer dereference in intel-thc-hid (Even Xu)

 - fix for interrupt delay control in intel-thc-hid (Even Xu)

 - fix finger release detection on some VTL-class touchpads (DaytonCL)

 - fix for correct enumeration on intel-ish-hid systems with no sensors
   (Zhang Lixu)

 - assorted device ID additions and device-specific quirks

* tag 'hid-for-linus-2026010801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (21 commits)
  HID: logitech: add HID++ support for Logitech MX Anywhere 3S
  HID: Elecom: Add support for ELECOM M-XT3DRBK (018C)
  HID: quirks: work around VID/PID conflict for appledisplay
  HID: Apply quirk HID_QUIRK_ALWAYS_POLL to Edifier QR30 (2d99:a101)
  HID: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()
  selftests/hid: add a test for the Digitizer/Button Type pressurepad
  selftests/hid: use a enum class for the different button types
  selftests/hid: require hidtools 0.12
  HID: multitouch: set INPUT_PROP_PRESSUREPAD based on Digitizer/Button Type
  HID: quirks: Add another Chicony HP 5MP Cameras to hid_ignore_list
  HID: Intel-thc-hid: Intel-thc: Add safety check for reading DMA buffer
  hid: intel-thc-hid: Select SGL_ALLOC
  selftests/hid: fix bpf compilations due to -fms-extensions
  HID: bpf: fix bpf compilation with -fms-extensions
  HID: Intel-thc-hid: Intel-thc: Fix wrong register reading
  HID: multitouch: add MT_QUIRK_STICKY_FINGERS to MT_CLS_VTL
  HID: intel-ish-hid: Reset enum_devices_done before enumeration
  HID: intel-ish-hid: Update ishtp bus match to support device ID table
  HID: Intel-thc-hid: Intel-thc: fix dma_unmap_sg() nents value
  HID: playstation: Center initial joystick axes to prevent spurious events
  ...
parents 108b661c d7f6629b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -57,6 +57,8 @@ clean:
%.bpf.o: %.bpf.c vmlinux.h $(BPFOBJ) | $(OUTPUT)
	$(call msg,BPF,$@)
	$(Q)$(CLANG) -g -O2 --target=bpf -Wall -Werror $(INCLUDES)		\
		     -Wno-microsoft-anon-tag					\
		     -fms-extensions						\
		     -c $(filter %.c,$^) -o $@ &&				\
	$(LLVM_STRIP) -g $@

+13 −2
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ static const __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,
		break;
	case USB_DEVICE_ID_ELECOM_M_XT3URBK_00FB:
	case USB_DEVICE_ID_ELECOM_M_XT3URBK_018F:
	case USB_DEVICE_ID_ELECOM_M_XT3DRBK:
	case USB_DEVICE_ID_ELECOM_M_XT3DRBK_00FC:
	case USB_DEVICE_ID_ELECOM_M_XT4DRBK:
		/*
		 * Report descriptor format:
@@ -102,6 +102,16 @@ static const __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,
		 */
		mouse_button_fixup(hdev, rdesc, *rsize, 12, 30, 14, 20, 8);
		break;
	case USB_DEVICE_ID_ELECOM_M_XT3DRBK_018C:
		/*
		 * Report descriptor format:
		 * 22: button bit count
		 * 30: padding bit count
		 * 24: button report size
		 * 16: button usage maximum
		 */
		mouse_button_fixup(hdev, rdesc, *rsize, 22, 30, 24, 16, 6);
		break;
	case USB_DEVICE_ID_ELECOM_M_DT2DRBK:
	case USB_DEVICE_ID_ELECOM_M_HT1DRBK_011C:
		/*
@@ -122,7 +132,8 @@ static const struct hid_device_id elecom_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XGL20DLBK) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3URBK_00FB) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3URBK_018F) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3DRBK) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3DRBK_00FC) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3DRBK_018C) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT4DRBK) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1URBK) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1DRBK) },
+6 −1
Original line number Diff line number Diff line
@@ -317,6 +317,7 @@
#define USB_DEVICE_ID_CHICONY_ACER_SWITCH12	0x1421
#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA	0xb824
#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2	0xb82c
#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA3	0xb882

#define USB_VENDOR_ID_CHUNGHWAT		0x2247
#define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH	0x0001
@@ -438,6 +439,9 @@
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001	0xa001
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C002	0xc002

#define USB_VENDOR_ID_EDIFIER		0x2d99
#define USB_DEVICE_ID_EDIFIER_QR30	0xa101	/* EDIFIER Hal0 2.0 SE */

#define USB_VENDOR_ID_ELAN		0x04f3
#define USB_DEVICE_ID_TOSHIBA_CLICK_L9W	0x0401
#define USB_DEVICE_ID_HP_X2		0x074d
@@ -451,7 +455,8 @@
#define USB_DEVICE_ID_ELECOM_M_XGL20DLBK	0x00e6
#define USB_DEVICE_ID_ELECOM_M_XT3URBK_00FB	0x00fb
#define USB_DEVICE_ID_ELECOM_M_XT3URBK_018F	0x018f
#define USB_DEVICE_ID_ELECOM_M_XT3DRBK	0x00fc
#define USB_DEVICE_ID_ELECOM_M_XT3DRBK_00FC	0x00fc
#define USB_DEVICE_ID_ELECOM_M_XT3DRBK_018C	0x018c
#define USB_DEVICE_ID_ELECOM_M_XT4DRBK	0x00fd
#define USB_DEVICE_ID_ELECOM_M_DT1URBK	0x00fe
#define USB_DEVICE_ID_ELECOM_M_DT1DRBK	0x00ff
+2 −0
Original line number Diff line number Diff line
@@ -4662,6 +4662,8 @@ static const struct hid_device_id hidpp_devices[] = {
	  HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb025) },
	{ /* MX Master 3S mouse over Bluetooth */
	  HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb034) },
	{ /* MX Anywhere 3S mouse over Bluetooth */
	  HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb037) },
	{ /* MX Anywhere 3SB mouse over Bluetooth */
	  HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb038) },
	{}
+12 −1
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ MODULE_LICENSE("GPL");
#define MT_INPUTMODE_TOUCHPAD		0x03

#define MT_BUTTONTYPE_CLICKPAD		0
#define MT_BUTTONTYPE_PRESSUREPAD	1

enum latency_mode {
	HID_LATENCY_NORMAL = 0,
@@ -179,6 +180,7 @@ struct mt_device {
	__u8 inputmode_value;	/* InputMode HID feature value */
	__u8 maxcontacts;
	bool is_buttonpad;	/* is this device a button pad? */
	bool is_pressurepad;	/* is this device a pressurepad? */
	bool is_haptic_touchpad;	/* is this device a haptic touchpad? */
	bool serial_maybe;	/* need to check for serial protocol */

@@ -393,6 +395,7 @@ static const struct mt_class mt_classes[] = {
	{ .name = MT_CLS_VTL,
		.quirks = MT_QUIRK_ALWAYS_VALID |
			MT_QUIRK_CONTACT_CNT_ACCURATE |
			MT_QUIRK_STICKY_FINGERS |
			MT_QUIRK_FORCE_GET_FEATURE,
	},
	{ .name = MT_CLS_GOOGLE,
@@ -530,8 +533,14 @@ static void mt_feature_mapping(struct hid_device *hdev,
		}

		mt_get_feature(hdev, field->report);
		if (field->value[usage->usage_index] == MT_BUTTONTYPE_CLICKPAD)
		switch (field->value[usage->usage_index]) {
		case MT_BUTTONTYPE_CLICKPAD:
			td->is_buttonpad = true;
			break;
		case MT_BUTTONTYPE_PRESSUREPAD:
			td->is_pressurepad = true;
			break;
		}

		break;
	case 0xff0000c5:
@@ -1393,6 +1402,8 @@ static int mt_touch_input_configured(struct hid_device *hdev,

	if (td->is_buttonpad)
		__set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
	if (td->is_pressurepad)
		__set_bit(INPUT_PROP_PRESSUREPAD, input->propbit);

	app->pending_palm_slots = devm_kcalloc(&hi->input->dev,
					       BITS_TO_LONGS(td->maxcontacts),
Loading