Commit 7eb61cc6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input fixes from Dmitry Torokhov:

 - a tweak to uinput interface to reject requests with abnormally large
   number of slots. 100 slots/contacts should be enough for real devices

 - support for FocalTech FT8201 added to the edt-ft5x06 driver

 - tweaks to i8042 to handle more devices that have issue with its
   emulation

 - Synaptics touchpad switched to native SMbus/RMI mode on HP Elitebook
   840 G2

 - other minor fixes

* tag 'input-for-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: himax_hx83112b - fix incorrect size when reading product ID
  Input: i8042 - use new forcenorestore quirk to replace old buggy quirk combination
  Input: i8042 - add forcenorestore quirk to leave controller untouched even on s3
  Input: i8042 - add Fujitsu Lifebook E756 to i8042 quirk table
  Input: uinput - reject requests with unreasonable number of slots
  Input: edt-ft5x06 - add support for FocalTech FT8201
  dt-bindings: input: touchscreen: edt-ft5x06: Document FT8201 support
  Input: adc-joystick - fix optional value handling
  Input: synaptics - enable SMBus for HP Elitebook 840 G2
  Input: ads7846 - ratelimit the spi_sync error message
parents 79a899e3 4e870e6b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ properties:
      - focaltech,ft5426
      - focaltech,ft5452
      - focaltech,ft6236
      - focaltech,ft8201
      - focaltech,ft8719

  reg:
+5 −2
Original line number Diff line number Diff line
@@ -182,8 +182,11 @@ static int adc_joystick_set_axes(struct device *dev, struct adc_joystick *joy)
			swap(range[0], range[1]);
		}

		fwnode_property_read_u32(child, "abs-fuzz", &fuzz);
		fwnode_property_read_u32(child, "abs-flat", &flat);
		if (fwnode_property_read_u32(child, "abs-fuzz", &fuzz))
			fuzz = 0;

		if (fwnode_property_read_u32(child, "abs-flat", &flat))
			flat = 0;

		input_set_abs_params(joy->input, axes[i].code,
				     range[0], range[1], fuzz, flat);
+14 −0
Original line number Diff line number Diff line
@@ -417,6 +417,20 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code,
		return -EINVAL;
	}

	/*
	 * Limit number of contacts to a reasonable value (100). This
	 * ensures that we need less than 2 pages for struct input_mt
	 * (we are not using in-kernel slot assignment so not going to
	 * allocate memory for the "red" table), and we should have no
	 * trouble getting this much memory.
	 */
	if (code == ABS_MT_SLOT && max > 99) {
		printk(KERN_DEBUG
		       "%s: unreasonably large number of slots requested: %d\n",
		       UINPUT_NAME, max);
		return -EINVAL;
	}

	return 0;
}

+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ static const char * const smbus_pnp_ids[] = {
	"LEN2054", /* E480 */
	"LEN2055", /* E580 */
	"LEN2068", /* T14 Gen 1 */
	"SYN3015", /* HP EliteBook 840 G2 */
	"SYN3052", /* HP EliteBook 840 G4 */
	"SYN3221", /* HP 15-ay000 */
	"SYN323d", /* HP Spectre X360 13-w013dx */
+17 −12
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ static inline void i8042_write_command(int val)
#define SERIO_QUIRK_KBDRESET		BIT(12)
#define SERIO_QUIRK_DRITEK		BIT(13)
#define SERIO_QUIRK_NOPNP		BIT(14)
#define SERIO_QUIRK_FORCENORESTORE	BIT(15)

/* Quirk table for different mainboards. Options similar or identical to i8042
 * module parameters.
@@ -626,6 +627,15 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX)
	},
	{
		/* Fujitsu Lifebook E756 */
		/* https://bugzilla.suse.com/show_bug.cgi?id=1229056 */
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
			DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E756"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX)
	},
	{
		/* Fujitsu Lifebook E5411 */
		.matches = {
@@ -1149,18 +1159,10 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
	},
	{
		/*
		 * 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, "N150CU"),
		},
		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
		.driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE)
	},
	{
		.matches = {
@@ -1685,6 +1687,8 @@ static void __init i8042_check_quirks(void)
	if (quirks & SERIO_QUIRK_NOPNP)
		i8042_nopnp = true;
#endif
	if (quirks & SERIO_QUIRK_FORCENORESTORE)
		i8042_forcenorestore = true;
}
#else
static inline void i8042_check_quirks(void) {}
@@ -1718,7 +1722,7 @@ static int __init i8042_platform_init(void)

	i8042_check_quirks();

	pr_debug("Active quirks (empty means none):%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
	pr_debug("Active quirks (empty means none):%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
		i8042_nokbd ? " nokbd" : "",
		i8042_noaux ? " noaux" : "",
		i8042_nomux ? " nomux" : "",
@@ -1738,10 +1742,11 @@ static int __init i8042_platform_init(void)
		"",
#endif
#ifdef CONFIG_PNP
		i8042_nopnp ? " nopnp" : "");
		i8042_nopnp ? " nopnp" : "",
#else
		"");
		"",
#endif
		i8042_forcenorestore ? " forcenorestore" : "");

	retval = i8042_pnp_init();
	if (retval)
Loading