Commit 2953fb65 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull HID fixes from Jiri Kosina:

 - fix for sticky fingers handling in hid-multitouch (Benjamin
   Tissoires)

 - fix for reporting of 0 battery levels (Dmitry Torokhov)

 - build fix for hid-haptic in certain configurations (Jonathan Denose)

 - improved probe and avoiding spamming kernel log by hid-nintendo
   (Vicki Pfau)

 - fix for OOB in hid-cp2112 (Deepak Sharma)

 - interrupt handling fix for intel-thc-hid (Even Xu)

 - a couple of new device IDs and device-specific quirks

* tag 'hid-for-linus-2025101701' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: logitech-hidpp: Add HIDPP_QUIRK_RESET_HI_RES_SCROLL
  selftests/hid: add tests for missing release on the Dell Synaptics
  HID: multitouch: fix sticky fingers
  HID: multitouch: fix name of Stylus input devices
  HID: hid-input: only ignore 0 battery events for digitizers
  HID: hid-debug: Fix spelling mistake "Rechargable" -> "Rechargeable"
  HID: Kconfig: Fix build error from CONFIG_HID_HAPTIC
  HID: nintendo: Rate limit IMU compensation message
  HID: nintendo: Wait longer for initial probe
  HID: core: Add printk_ratelimited variants to hid_warn() etc
  HID: quirks: Add ALWAYS_POLL quirk for VRS R295 steering wheel
  HID: quirks: avoid Cooler Master MM712 dongle wakeup bug
  HID: cp2112: Add parameter validation to data length
  HID: intel-thc-hid: intel-quickspi: Add ARL PCI Device Id's
  HID: intel-thc-hid: Intel-quickspi: switch first interrupt from level to edge detection
  HID: intel-thc-hid: intel-quicki2c: Fix wrong type casting
parents d303caf5 ed80cc46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ config HID_GENERIC
	If unsure, say Y.

config HID_HAPTIC
	tristate "Haptic touchpad support"
	bool "Haptic touchpad support"
	default n
	help
	Support for touchpads with force sensors and haptic actuators instead of a
+24 −3
Original line number Diff line number Diff line
@@ -689,6 +689,13 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr,
			count = cp2112_write_read_req(buf, addr, read_length,
						      command, NULL, 0);
		} else {
			/* Copy starts from data->block[1] so the length can
			 * be at max I2C_SMBUS_CLOCK_MAX + 1
			 */

			if (data->block[0] > I2C_SMBUS_BLOCK_MAX + 1)
				count = -EINVAL;
			else
				count = cp2112_write_req(buf, addr, command,
						 data->block + 1,
						 data->block[0]);
@@ -700,6 +707,13 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr,
						      I2C_SMBUS_BLOCK_MAX,
						      command, NULL, 0);
		} else {
			/* data_length here is data->block[0] + 1
			 * so make sure that the data->block[0] is
			 * less than or equals I2C_SMBUS_BLOCK_MAX + 1
			*/
			if (data->block[0] > I2C_SMBUS_BLOCK_MAX + 1)
				count = -EINVAL;
			else
				count = cp2112_write_req(buf, addr, command,
						 data->block,
						 data->block[0] + 1);
@@ -709,6 +723,13 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr,
		size = I2C_SMBUS_BLOCK_DATA;
		read_write = I2C_SMBUS_READ;

		/* data_length is data->block[0] + 1, so
		 * so data->block[0] should be less than or
		 * equal to the I2C_SMBUS_BLOCK_MAX + 1
		*/
		if (data->block[0] > I2C_SMBUS_BLOCK_MAX + 1)
			count = -EINVAL;
		else
			count = cp2112_write_read_req(buf, addr, I2C_SMBUS_BLOCK_MAX,
					      command, data->block,
					      data->block[0] + 1);
+1 −1
Original line number Diff line number Diff line
@@ -2523,7 +2523,7 @@ static const struct hid_usage_entry hid_usage_table[] = {
		{ 0x85, 0x0088, "iDeviceName" },
		{ 0x85, 0x0089, "iDeviceChemistry" },
		{ 0x85, 0x008a, "ManufacturerData" },
		{ 0x85, 0x008b, "Rechargable" },
		{ 0x85, 0x008b, "Rechargeable" },
		{ 0x85, 0x008c, "WarningCapacityLimit" },
		{ 0x85, 0x008d, "CapacityGranularity1" },
		{ 0x85, 0x008e, "CapacityGranularity2" },
+4 −0
Original line number Diff line number Diff line
@@ -342,6 +342,9 @@
#define USB_DEVICE_ID_CODEMERCS_IOW_FIRST	0x1500
#define USB_DEVICE_ID_CODEMERCS_IOW_LAST	0x15ff

#define USB_VENDOR_ID_COOLER_MASTER	0x2516
#define USB_DEVICE_ID_COOLER_MASTER_MICE_DONGLE	0x01b7

#define USB_VENDOR_ID_CORSAIR		0x1b1c
#define USB_DEVICE_ID_CORSAIR_K90	0x1b02
#define USB_DEVICE_ID_CORSAIR_K70R      0x1b09
@@ -1432,6 +1435,7 @@

#define USB_VENDOR_ID_VRS	0x0483
#define USB_DEVICE_ID_VRS_DFP	0xa355
#define USB_DEVICE_ID_VRS_R295	0xa44c

#define USB_VENDOR_ID_VTL		0x0306
#define USB_DEVICE_ID_VTL_MULTITOUCH_FF3F	0xff3f
+4 −1
Original line number Diff line number Diff line
@@ -635,7 +635,10 @@ static void hidinput_update_battery(struct hid_device *dev, unsigned int usage,
		return;
	}

	if (value == 0 || value < dev->battery_min || value > dev->battery_max)
	if ((usage & HID_USAGE_PAGE) == HID_UP_DIGITIZER && value == 0)
		return;

	if (value < dev->battery_min || value > dev->battery_max)
		return;

	capacity = hidinput_scale_battery_capacity(dev, value);
Loading