Commit 31d7109a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input updates from Dmitry Torokhov:

 - several new device IDs added to xpad game controller driver

 - support for imagis IST3038H variant of chip added to imagis touch
   controller driver

 - a fix for GPIO allocation for ads7846 touch controller driver

 - a fix for iqs7222 driver to properly support status register

 - a fix for goodix-berlin touch controller driver to use the right name
   for the regulator

 - more i8042 quirks to better handle several old Clevo devices.

* tag 'input-for-v6.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  MAINTAINERS: Remove myself from the goodix touchscreen maintainers
  Input: iqs7222 - preserve system status register
  Input: i8042 - swap old quirk combination with new quirk for more devices
  Input: i8042 - swap old quirk combination with new quirk for several devices
  Input: i8042 - add required quirks for missing old boardnames
  Input: i8042 - swap old quirk combination with new quirk for NHxxRZQ
  Input: xpad - rename QH controller to Legion Go S
  Input: xpad - add support for TECNO Pocket Go
  Input: xpad - add support for ZOTAC Gaming Zone
  Input: goodix-berlin - fix vddio regulator references
  Input: goodix-berlin - fix comment referencing wrong regulator
  Input: imagis - add support for imagis IST3038H
  dt-bindings: input/touchscreen: imagis: add compatible for ist3038h
  Input: xpad - add multiple supported devices
  Input: xpad - add 8BitDo SN30 Pro, Hyperkin X91 and Gamesir G7 SE controllers
  Input: ads7846 - fix gpiod allocation
  Input: wdt87xx_i2c - fix compiler warning
parents cd3a56ac fd10709e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ properties:
      - imagis,ist3038
      - imagis,ist3038b
      - imagis,ist3038c
      - imagis,ist3038h

  reg:
    maxItems: 1
+0 −1
Original line number Diff line number Diff line
@@ -9829,7 +9829,6 @@ S: Maintained
F:	drivers/media/usb/go7007/
GOODIX TOUCHSCREEN
M:	Bastien Nocera <hadess@hadess.net>
M:	Hans de Goede <hdegoede@redhat.com>
L:	linux-input@vger.kernel.org
S:	Maintained
+32 −7
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@ static const struct xpad_device {
	{ 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX },
	{ 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX },
	{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
	{ 0x044f, 0xd01e, "ThrustMaster, Inc. ESWAP X 2 ELDEN RING EDITION", 0, XTYPE_XBOXONE },
	{ 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX },
	{ 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 },
	{ 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
@@ -177,6 +178,7 @@ static const struct xpad_device {
	{ 0x06a3, 0x0200, "Saitek Racing Wheel", 0, XTYPE_XBOX },
	{ 0x06a3, 0x0201, "Saitek Adrenalin", 0, XTYPE_XBOX },
	{ 0x06a3, 0xf51a, "Saitek P3600", 0, XTYPE_XBOX360 },
	{ 0x0738, 0x4503, "Mad Catz Racing Wheel", 0, XTYPE_XBOXONE },
	{ 0x0738, 0x4506, "Mad Catz 4506 Wireless Controller", 0, XTYPE_XBOX },
	{ 0x0738, 0x4516, "Mad Catz Control Pad", 0, XTYPE_XBOX },
	{ 0x0738, 0x4520, "Mad Catz Control Pad Pro", 0, XTYPE_XBOX },
@@ -238,6 +240,7 @@ static const struct xpad_device {
	{ 0x0e6f, 0x0146, "Rock Candy Wired Controller for Xbox One", 0, XTYPE_XBOXONE },
	{ 0x0e6f, 0x0147, "PDP Marvel Xbox One Controller", 0, XTYPE_XBOXONE },
	{ 0x0e6f, 0x015c, "PDP Xbox One Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
	{ 0x0e6f, 0x015d, "PDP Mirror's Edge Official Wired Controller for Xbox One", XTYPE_XBOXONE },
	{ 0x0e6f, 0x0161, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
	{ 0x0e6f, 0x0162, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
	{ 0x0e6f, 0x0163, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
@@ -276,12 +279,15 @@ static const struct xpad_device {
	{ 0x0f0d, 0x0078, "Hori Real Arcade Pro V Kai Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
	{ 0x0f0d, 0x00c5, "Hori Fighting Commander ONE", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
	{ 0x0f0d, 0x00dc, "HORIPAD FPS for Nintendo Switch", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
	{ 0x0f0d, 0x0151, "Hori Racing Wheel Overdrive for Xbox Series X", 0, XTYPE_XBOXONE },
	{ 0x0f0d, 0x0152, "Hori Racing Wheel Overdrive for Xbox Series X", 0, XTYPE_XBOXONE },
	{ 0x0f30, 0x010b, "Philips Recoil", 0, XTYPE_XBOX },
	{ 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX },
	{ 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX },
	{ 0x102c, 0xff0c, "Joytech Wireless Advanced Controller", 0, XTYPE_XBOX },
	{ 0x1038, 0x1430, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
	{ 0x1038, 0x1431, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
	{ 0x10f5, 0x7005, "Turtle Beach Recon Controller", 0, XTYPE_XBOXONE },
	{ 0x11c9, 0x55f0, "Nacon GC-100XF", 0, XTYPE_XBOX360 },
	{ 0x11ff, 0x0511, "PXN V900", 0, XTYPE_XBOX360 },
	{ 0x1209, 0x2882, "Ardwiino Controller", 0, XTYPE_XBOX360 },
@@ -306,7 +312,7 @@ static const struct xpad_device {
	{ 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 },
	{ 0x17ef, 0x6182, "Lenovo Legion Controller for Windows", 0, XTYPE_XBOX360 },
	{ 0x1949, 0x041a, "Amazon Game Controller", 0, XTYPE_XBOX360 },
	{ 0x1a86, 0xe310, "QH Electronics Controller", 0, XTYPE_XBOX360 },
	{ 0x1a86, 0xe310, "Legion Go S", 0, XTYPE_XBOX360 },
	{ 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 },
	{ 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
	{ 0x1bad, 0x0130, "Ion Drum Rocker", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
@@ -343,6 +349,7 @@ static const struct xpad_device {
	{ 0x1bad, 0xfa01, "MadCatz GamePad", 0, XTYPE_XBOX360 },
	{ 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 },
	{ 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 },
	{ 0x1ee9, 0x1590, "ZOTAC Gaming Zone", 0, XTYPE_XBOX360 },
	{ 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE },
	{ 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE },
	{ 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 },
@@ -366,6 +373,7 @@ static const struct xpad_device {
	{ 0x24c6, 0x5510, "Hori Fighting Commander ONE (Xbox 360/PC Mode)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
	{ 0x24c6, 0x551a, "PowerA FUSION Pro Controller", 0, XTYPE_XBOXONE },
	{ 0x24c6, 0x561a, "PowerA FUSION Controller", 0, XTYPE_XBOXONE },
	{ 0x24c6, 0x581a, "ThrustMaster XB1 Classic Controller", 0, XTYPE_XBOXONE },
	{ 0x24c6, 0x5b00, "ThrustMaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 },
	{ 0x24c6, 0x5b02, "Thrustmaster, Inc. GPX Controller", 0, XTYPE_XBOX360 },
	{ 0x24c6, 0x5b03, "Thrustmaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 },
@@ -374,10 +382,15 @@ static const struct xpad_device {
	{ 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 },
	{ 0x294b, 0x3303, "Snakebyte GAMEPAD BASE X", 0, XTYPE_XBOXONE },
	{ 0x294b, 0x3404, "Snakebyte GAMEPAD RGB X", 0, XTYPE_XBOXONE },
	{ 0x2993, 0x2001, "TECNO Pocket Go", 0, XTYPE_XBOX360 },
	{ 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE },
	{ 0x2dc8, 0x3106, "8BitDo Ultimate Wireless / Pro 2 Wired Controller", 0, XTYPE_XBOX360 },
	{ 0x2dc8, 0x3109, "8BitDo Ultimate Wireless Bluetooth", 0, XTYPE_XBOX360 },
	{ 0x2dc8, 0x310a, "8BitDo Ultimate 2C Wireless Controller", 0, XTYPE_XBOX360 },
	{ 0x2dc8, 0x6001, "8BitDo SN30 Pro", 0, XTYPE_XBOX360 },
	{ 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE },
	{ 0x2e24, 0x1688, "Hyperkin X91 X-Box One pad", 0, XTYPE_XBOXONE },
	{ 0x2e95, 0x0504, "SCUF Gaming Controller", MAP_SELECT_BUTTON, XTYPE_XBOXONE },
	{ 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 },
	{ 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 },
	{ 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 },
@@ -385,11 +398,16 @@ static const struct xpad_device {
	{ 0x31e3, 0x1230, "Wooting Two HE (ARM)", 0, XTYPE_XBOX360 },
	{ 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 },
	{ 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 },
	{ 0x3285, 0x0603, "Nacon Pro Compact controller for Xbox", 0, XTYPE_XBOXONE },
	{ 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 },
	{ 0x3285, 0x0614, "Nacon Pro Compact", 0, XTYPE_XBOXONE },
	{ 0x3285, 0x0646, "Nacon Pro Compact", 0, XTYPE_XBOXONE },
	{ 0x3285, 0x0662, "Nacon Revolution5 Pro", 0, XTYPE_XBOX360 },
	{ 0x3285, 0x0663, "Nacon Evol-X", 0, XTYPE_XBOXONE },
	{ 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 },
	{ 0x3537, 0x1010, "GameSir G7 SE", 0, XTYPE_XBOXONE },
	{ 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX },
	{ 0x413d, 0x2104, "Black Shark Green Ghost Gamepad", 0, XTYPE_XBOX360 },
	{ 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
	{ 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN }
};
@@ -488,6 +506,7 @@ static const struct usb_device_id xpad_table[] = {
	XPAD_XBOX360_VENDOR(0x03f0),		/* HP HyperX Xbox 360 controllers */
	XPAD_XBOXONE_VENDOR(0x03f0),		/* HP HyperX Xbox One controllers */
	XPAD_XBOX360_VENDOR(0x044f),		/* Thrustmaster Xbox 360 controllers */
	XPAD_XBOXONE_VENDOR(0x044f),		/* Thrustmaster Xbox One controllers */
	XPAD_XBOX360_VENDOR(0x045e),		/* Microsoft Xbox 360 controllers */
	XPAD_XBOXONE_VENDOR(0x045e),		/* Microsoft Xbox One controllers */
	XPAD_XBOX360_VENDOR(0x046d),		/* Logitech Xbox 360-style controllers */
@@ -519,8 +538,9 @@ static const struct usb_device_id xpad_table[] = {
	XPAD_XBOX360_VENDOR(0x1689),		/* Razer Onza */
	XPAD_XBOX360_VENDOR(0x17ef),		/* Lenovo */
	XPAD_XBOX360_VENDOR(0x1949),		/* Amazon controllers */
	XPAD_XBOX360_VENDOR(0x1a86),		/* QH Electronics */
	XPAD_XBOX360_VENDOR(0x1a86),		/* Nanjing Qinheng Microelectronics (WCH) */
	XPAD_XBOX360_VENDOR(0x1bad),		/* Harmonix Rock Band guitar and drums */
	XPAD_XBOX360_VENDOR(0x1ee9),		/* ZOTAC Technology Limited */
	XPAD_XBOX360_VENDOR(0x20d6),		/* PowerA controllers */
	XPAD_XBOXONE_VENDOR(0x20d6),		/* PowerA controllers */
	XPAD_XBOX360_VENDOR(0x2345),		/* Machenike Controllers */
@@ -529,16 +549,19 @@ static const struct usb_device_id xpad_table[] = {
	XPAD_XBOX360_VENDOR(0x2563),		/* OneXPlayer Gamepad */
	XPAD_XBOX360_VENDOR(0x260d),		/* Dareu H101 */
	XPAD_XBOXONE_VENDOR(0x294b),		/* Snakebyte */
	XPAD_XBOX360_VENDOR(0x2993),		/* TECNO Mobile */
	XPAD_XBOX360_VENDOR(0x2c22),		/* Qanba Controllers */
	XPAD_XBOX360_VENDOR(0x2dc8),            /* 8BitDo Pro 2 Wired Controller */
	XPAD_XBOXONE_VENDOR(0x2dc8),		/* 8BitDo Pro 2 Wired Controller for Xbox */
	XPAD_XBOXONE_VENDOR(0x2e24),		/* Hyperkin Duke Xbox One pad */
	XPAD_XBOX360_VENDOR(0x2f24),		/* GameSir controllers */
	XPAD_XBOX360_VENDOR(0x2dc8),		/* 8BitDo Controllers */
	XPAD_XBOXONE_VENDOR(0x2dc8),		/* 8BitDo Controllers */
	XPAD_XBOXONE_VENDOR(0x2e24),		/* Hyperkin Controllers */
	XPAD_XBOX360_VENDOR(0x2f24),		/* GameSir Controllers */
	XPAD_XBOXONE_VENDOR(0x2e95),		/* SCUF Gaming Controller */
	XPAD_XBOX360_VENDOR(0x31e3),		/* Wooting Keyboards */
	XPAD_XBOX360_VENDOR(0x3285),		/* Nacon GC-100 */
	XPAD_XBOXONE_VENDOR(0x3285),		/* Nacon Evol-X */
	XPAD_XBOX360_VENDOR(0x3537),		/* GameSir Controllers */
	XPAD_XBOXONE_VENDOR(0x3537),		/* GameSir Controllers */
	XPAD_XBOX360_VENDOR(0x413d),		/* Black Shark Green Ghost Controller */
	{ }
};

@@ -691,7 +714,9 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
	XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),
	XBOXONE_INIT_PKT(0x045e, 0x0b00, extra_input_packet_init),
	XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_led_on),
	XBOXONE_INIT_PKT(0x20d6, 0xa01a, xboxone_pdp_led_on),
	XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_auth),
	XBOXONE_INIT_PKT(0x20d6, 0xa01a, xboxone_pdp_auth),
	XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
	XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
	XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),
+22 −28
Original line number Diff line number Diff line
@@ -100,11 +100,11 @@ enum iqs7222_reg_key_id {

enum iqs7222_reg_grp_id {
	IQS7222_REG_GRP_STAT,
	IQS7222_REG_GRP_FILT,
	IQS7222_REG_GRP_CYCLE,
	IQS7222_REG_GRP_GLBL,
	IQS7222_REG_GRP_BTN,
	IQS7222_REG_GRP_CHAN,
	IQS7222_REG_GRP_FILT,
	IQS7222_REG_GRP_SLDR,
	IQS7222_REG_GRP_TPAD,
	IQS7222_REG_GRP_GPIO,
@@ -286,6 +286,7 @@ static const struct iqs7222_event_desc iqs7222_tp_events[] = {

struct iqs7222_reg_grp_desc {
	u16 base;
	u16 val_len;
	int num_row;
	int num_col;
};
@@ -342,6 +343,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xAC00,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -400,6 +402,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xAC00,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -454,6 +457,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xC400,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -496,6 +500,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xC400,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -543,6 +548,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xAA00,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -600,6 +606,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xAA00,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -656,6 +663,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xAE00,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -712,6 +720,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xAE00,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -768,6 +777,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = {
			},
			[IQS7222_REG_GRP_FILT] = {
				.base = 0xAE00,
				.val_len = 3,
				.num_row = 1,
				.num_col = 2,
			},
@@ -1604,7 +1614,7 @@ static int iqs7222_force_comms(struct iqs7222_private *iqs7222)
}

static int iqs7222_read_burst(struct iqs7222_private *iqs7222,
			      u16 reg, void *val, u16 num_val)
			      u16 reg, void *val, u16 val_len)
{
	u8 reg_buf[sizeof(__be16)];
	int ret, i;
@@ -1619,7 +1629,7 @@ static int iqs7222_read_burst(struct iqs7222_private *iqs7222,
		{
			.addr = client->addr,
			.flags = I2C_M_RD,
			.len = num_val * sizeof(__le16),
			.len = val_len,
			.buf = (u8 *)val,
		},
	};
@@ -1675,7 +1685,7 @@ static int iqs7222_read_word(struct iqs7222_private *iqs7222, u16 reg, u16 *val)
	__le16 val_buf;
	int error;

	error = iqs7222_read_burst(iqs7222, reg, &val_buf, 1);
	error = iqs7222_read_burst(iqs7222, reg, &val_buf, sizeof(val_buf));
	if (error)
		return error;

@@ -1685,10 +1695,9 @@ static int iqs7222_read_word(struct iqs7222_private *iqs7222, u16 reg, u16 *val)
}

static int iqs7222_write_burst(struct iqs7222_private *iqs7222,
			       u16 reg, const void *val, u16 num_val)
			       u16 reg, const void *val, u16 val_len)
{
	int reg_len = reg > U8_MAX ? sizeof(reg) : sizeof(u8);
	int val_len = num_val * sizeof(__le16);
	int msg_len = reg_len + val_len;
	int ret, i;
	struct i2c_client *client = iqs7222->client;
@@ -1747,7 +1756,7 @@ static int iqs7222_write_word(struct iqs7222_private *iqs7222, u16 reg, u16 val)
{
	__le16 val_buf = cpu_to_le16(val);

	return iqs7222_write_burst(iqs7222, reg, &val_buf, 1);
	return iqs7222_write_burst(iqs7222, reg, &val_buf, sizeof(val_buf));
}

static int iqs7222_ati_trigger(struct iqs7222_private *iqs7222)
@@ -1831,30 +1840,14 @@ static int iqs7222_dev_init(struct iqs7222_private *iqs7222, int dir)

	/*
	 * Acknowledge reset before writing any registers in case the device
	 * suffers a spurious reset during initialization. Because this step
	 * may change the reserved fields of the second filter beta register,
	 * its cache must be updated.
	 *
	 * Writing the second filter beta register, in turn, may clobber the
	 * system status register. As such, the filter beta register pair is
	 * written first to protect against this hazard.
	 * suffers a spurious reset during initialization.
	 */
	if (dir == WRITE) {
		u16 reg = dev_desc->reg_grps[IQS7222_REG_GRP_FILT].base + 1;
		u16 filt_setup;

		error = iqs7222_write_word(iqs7222, IQS7222_SYS_SETUP,
					   iqs7222->sys_setup[0] |
					   IQS7222_SYS_SETUP_ACK_RESET);
		if (error)
			return error;

		error = iqs7222_read_word(iqs7222, reg, &filt_setup);
		if (error)
			return error;

		iqs7222->filt_setup[1] &= GENMASK(7, 0);
		iqs7222->filt_setup[1] |= (filt_setup & ~GENMASK(7, 0));
	}

	/*
@@ -1883,6 +1876,7 @@ static int iqs7222_dev_init(struct iqs7222_private *iqs7222, int dir)
		int num_col = dev_desc->reg_grps[i].num_col;
		u16 reg = dev_desc->reg_grps[i].base;
		__le16 *val_buf;
		u16 val_len = dev_desc->reg_grps[i].val_len ? : num_col * sizeof(*val_buf);
		u16 *val;

		if (!num_col)
@@ -1900,7 +1894,7 @@ static int iqs7222_dev_init(struct iqs7222_private *iqs7222, int dir)
			switch (dir) {
			case READ:
				error = iqs7222_read_burst(iqs7222, reg,
							   val_buf, num_col);
							   val_buf, val_len);
				for (k = 0; k < num_col; k++)
					val[k] = le16_to_cpu(val_buf[k]);
				break;
@@ -1909,7 +1903,7 @@ static int iqs7222_dev_init(struct iqs7222_private *iqs7222, int dir)
				for (k = 0; k < num_col; k++)
					val_buf[k] = cpu_to_le16(val[k]);
				error = iqs7222_write_burst(iqs7222, reg,
							    val_buf, num_col);
							    val_buf, val_len);
				break;

			default:
@@ -1962,7 +1956,7 @@ static int iqs7222_dev_info(struct iqs7222_private *iqs7222)
	int error, i;

	error = iqs7222_read_burst(iqs7222, IQS7222_PROD_NUM, dev_id,
				   ARRAY_SIZE(dev_id));
				   sizeof(dev_id));
	if (error)
		return error;

@@ -2915,7 +2909,7 @@ static int iqs7222_report(struct iqs7222_private *iqs7222)
	__le16 status[IQS7222_MAX_COLS_STAT];

	error = iqs7222_read_burst(iqs7222, IQS7222_SYS_STATUS, status,
				   num_stat);
				   num_stat * sizeof(*status));
	if (error)
		return error;

+55 −56
Original line number Diff line number Diff line
@@ -1080,16 +1080,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
			DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"),
			DMI_MATCH(DMI_BOARD_NAME, "AURA1501"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"),
			DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/* Mivvy M310 */
@@ -1159,9 +1157,7 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
	},
	/*
	 * A lot of modern Clevo barebones have touchpad and/or keyboard issues
	 * after suspend fixable with nomux + reset + noloop + nopnp. Luckily,
	 * none of them have an external PS/2 port so this can safely be set for
	 * all of them.
	 * after suspend fixable with the forcenorestore quirk.
	 * Clevo barebones come with board_vendor and/or system_vendor set to
	 * either the very generic string "Notebook" and/or a different value
	 * for each individual reseller. The only somewhat universal way to
@@ -1171,29 +1167,25 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "LAPQC71A"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "LAPQC71B"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "N140CU"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "N141CU"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
@@ -1205,29 +1197,19 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/*
		 * Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes
		 * the keyboard very laggy for ~5 seconds after boot and
		 * sometimes also after resume.
		 * However both are required for the keyboard to not fail
		 * completely sometimes after boot or resume.
		 */
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "NHxxRZQ"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	/*
	 * At least one modern Clevo barebone has the touchpad connected both
@@ -1243,17 +1225,15 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "NS50MU"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOAUX | SERIO_QUIRK_NOMUX |
					SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP |
					SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_NOAUX |
					SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "NS50_70MU"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOAUX | SERIO_QUIRK_NOMUX |
					SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP |
					SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_NOAUX |
					SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
@@ -1265,8 +1245,13 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "NJ50_70CU"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "P640RE"),
		},
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/*
@@ -1277,16 +1262,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_PRODUCT_NAME, "P65xH"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/* Clevo P650RS, 650RP6, Sager NP8152-S, and others */
		.matches = {
			DMI_MATCH(DMI_PRODUCT_NAME, "P65xRP"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/*
@@ -1297,8 +1280,7 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_PRODUCT_NAME, "P65_P67H"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/*
@@ -1309,8 +1291,7 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_PRODUCT_NAME, "P65_67RP"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/*
@@ -1321,8 +1302,7 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_PRODUCT_NAME, "P65_67RS"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/*
@@ -1333,22 +1313,43 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_PRODUCT_NAME, "P67xRP"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "PB50_70DFx,DDx"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "PB51RF"),
		},
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "PB71RD"),
		},
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "PC70DR"),
		},
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "PCX0DX"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "PCX0DX_GN20"),
		},
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	/* See comment on TUXEDO InfinityBook S17 Gen6 / Clevo NS70MU above */
	{
@@ -1361,15 +1362,13 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "X170SM"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "X170KM-G"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		/*
Loading