Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'input-for-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

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

+54 -30
+1
Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
··· 42 42 - focaltech,ft5426 43 43 - focaltech,ft5452 44 44 - focaltech,ft6236 45 + - focaltech,ft8201 45 46 - focaltech,ft8719 46 47 47 48 reg:
+5 -2
drivers/input/joystick/adc-joystick.c
··· 182 182 swap(range[0], range[1]); 183 183 } 184 184 185 - fwnode_property_read_u32(child, "abs-fuzz", &fuzz); 186 - fwnode_property_read_u32(child, "abs-flat", &flat); 185 + if (fwnode_property_read_u32(child, "abs-fuzz", &fuzz)) 186 + fuzz = 0; 187 + 188 + if (fwnode_property_read_u32(child, "abs-flat", &flat)) 189 + flat = 0; 187 190 188 191 input_set_abs_params(joy->input, axes[i].code, 189 192 range[0], range[1], fuzz, flat);
+14
drivers/input/misc/uinput.c
··· 417 417 return -EINVAL; 418 418 } 419 419 420 + /* 421 + * Limit number of contacts to a reasonable value (100). This 422 + * ensures that we need less than 2 pages for struct input_mt 423 + * (we are not using in-kernel slot assignment so not going to 424 + * allocate memory for the "red" table), and we should have no 425 + * trouble getting this much memory. 426 + */ 427 + if (code == ABS_MT_SLOT && max > 99) { 428 + printk(KERN_DEBUG 429 + "%s: unreasonably large number of slots requested: %d\n", 430 + UINPUT_NAME, max); 431 + return -EINVAL; 432 + } 433 + 420 434 return 0; 421 435 } 422 436
+1
drivers/input/mouse/synaptics.c
··· 189 189 "LEN2054", /* E480 */ 190 190 "LEN2055", /* E580 */ 191 191 "LEN2068", /* T14 Gen 1 */ 192 + "SYN3015", /* HP EliteBook 840 G2 */ 192 193 "SYN3052", /* HP EliteBook 840 G4 */ 193 194 "SYN3221", /* HP 15-ay000 */ 194 195 "SYN323d", /* HP Spectre X360 13-w013dx */
+17 -12
drivers/input/serio/i8042-acpipnpio.h
··· 83 83 #define SERIO_QUIRK_KBDRESET BIT(12) 84 84 #define SERIO_QUIRK_DRITEK BIT(13) 85 85 #define SERIO_QUIRK_NOPNP BIT(14) 86 + #define SERIO_QUIRK_FORCENORESTORE BIT(15) 86 87 87 88 /* Quirk table for different mainboards. Options similar or identical to i8042 88 89 * module parameters. ··· 628 627 .driver_data = (void *)(SERIO_QUIRK_NOMUX) 629 628 }, 630 629 { 630 + /* Fujitsu Lifebook E756 */ 631 + /* https://bugzilla.suse.com/show_bug.cgi?id=1229056 */ 632 + .matches = { 633 + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), 634 + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E756"), 635 + }, 636 + .driver_data = (void *)(SERIO_QUIRK_NOMUX) 637 + }, 638 + { 631 639 /* Fujitsu Lifebook E5411 */ 632 640 .matches = { 633 641 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU CLIENT COMPUTING LIMITED"), ··· 1159 1149 SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) 1160 1150 }, 1161 1151 { 1162 - /* 1163 - * Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes 1164 - * the keyboard very laggy for ~5 seconds after boot and 1165 - * sometimes also after resume. 1166 - * However both are required for the keyboard to not fail 1167 - * completely sometimes after boot or resume. 1168 - */ 1169 1152 .matches = { 1170 1153 DMI_MATCH(DMI_BOARD_NAME, "N150CU"), 1171 1154 }, 1172 - .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | 1173 - SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) 1155 + .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) 1174 1156 }, 1175 1157 { 1176 1158 .matches = { ··· 1687 1685 if (quirks & SERIO_QUIRK_NOPNP) 1688 1686 i8042_nopnp = true; 1689 1687 #endif 1688 + if (quirks & SERIO_QUIRK_FORCENORESTORE) 1689 + i8042_forcenorestore = true; 1690 1690 } 1691 1691 #else 1692 1692 static inline void i8042_check_quirks(void) {} ··· 1722 1718 1723 1719 i8042_check_quirks(); 1724 1720 1725 - pr_debug("Active quirks (empty means none):%s%s%s%s%s%s%s%s%s%s%s%s%s\n", 1721 + pr_debug("Active quirks (empty means none):%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", 1726 1722 i8042_nokbd ? " nokbd" : "", 1727 1723 i8042_noaux ? " noaux" : "", 1728 1724 i8042_nomux ? " nomux" : "", ··· 1742 1738 "", 1743 1739 #endif 1744 1740 #ifdef CONFIG_PNP 1745 - i8042_nopnp ? " nopnp" : ""); 1741 + i8042_nopnp ? " nopnp" : "", 1746 1742 #else 1747 - ""); 1743 + "", 1748 1744 #endif 1745 + i8042_forcenorestore ? " forcenorestore" : ""); 1749 1746 1750 1747 retval = i8042_pnp_init(); 1751 1748 if (retval)
+7 -3
drivers/input/serio/i8042.c
··· 115 115 MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings"); 116 116 #endif 117 117 118 + static bool i8042_forcenorestore; 119 + module_param_named(forcenorestore, i8042_forcenorestore, bool, 0); 120 + MODULE_PARM_DESC(forcenorestore, "Force no restore on s3 resume, copying s2idle behaviour"); 121 + 118 122 #define DEBUG 119 123 #ifdef DEBUG 120 124 static bool i8042_debug; ··· 1236 1232 { 1237 1233 int i; 1238 1234 1239 - if (pm_suspend_via_firmware()) 1235 + if (!i8042_forcenorestore && pm_suspend_via_firmware()) 1240 1236 i8042_controller_reset(true); 1241 1237 1242 1238 /* Set up serio interrupts for system wakeup. */ ··· 1252 1248 1253 1249 static int i8042_pm_resume_noirq(struct device *dev) 1254 1250 { 1255 - if (!pm_resume_via_firmware()) 1251 + if (i8042_forcenorestore || !pm_resume_via_firmware()) 1256 1252 i8042_interrupt(0, NULL); 1257 1253 1258 1254 return 0; ··· 1275 1271 * not restore the controller state to whatever it had been at boot 1276 1272 * time, so we do not need to do anything. 1277 1273 */ 1278 - if (!pm_suspend_via_firmware()) 1274 + if (i8042_forcenorestore || !pm_suspend_via_firmware()) 1279 1275 return 0; 1280 1276 1281 1277 /*
+1 -1
drivers/input/touchscreen/ads7846.c
··· 824 824 m = &ts->msg[msg_idx]; 825 825 error = spi_sync(ts->spi, m); 826 826 if (error) { 827 - dev_err(&ts->spi->dev, "spi_sync --> %d\n", error); 827 + dev_err_ratelimited(&ts->spi->dev, "spi_sync --> %d\n", error); 828 828 packet->ignore = true; 829 829 return; 830 830 }
+6
drivers/input/touchscreen/edt-ft5x06.c
··· 1474 1474 .max_support_points = 2, 1475 1475 }; 1476 1476 1477 + static const struct edt_i2c_chip_data edt_ft8201_data = { 1478 + .max_support_points = 10, 1479 + }; 1480 + 1477 1481 static const struct edt_i2c_chip_data edt_ft8719_data = { 1478 1482 .max_support_points = 10, 1479 1483 }; ··· 1489 1485 { .name = "ft5452", .driver_data = (long)&edt_ft5452_data }, 1490 1486 /* Note no edt- prefix for compatibility with the ft6236.c driver */ 1491 1487 { .name = "ft6236", .driver_data = (long)&edt_ft6236_data }, 1488 + { .name = "ft8201", .driver_data = (long)&edt_ft8201_data }, 1492 1489 { .name = "ft8719", .driver_data = (long)&edt_ft8719_data }, 1493 1490 { /* sentinel */ } 1494 1491 }; ··· 1505 1500 { .compatible = "focaltech,ft5452", .data = &edt_ft5452_data }, 1506 1501 /* Note focaltech vendor prefix for compatibility with ft6236.c */ 1507 1502 { .compatible = "focaltech,ft6236", .data = &edt_ft6236_data }, 1503 + { .compatible = "focaltech,ft8201", .data = &edt_ft8201_data }, 1508 1504 { .compatible = "focaltech,ft8719", .data = &edt_ft8719_data }, 1509 1505 { /* sentinel */ } 1510 1506 };
+2 -12
drivers/input/touchscreen/himax_hx83112b.c
··· 130 130 return 0; 131 131 } 132 132 133 - static int himax_read_mcu(struct himax_ts_data *ts, u32 address, u32 *dst) 134 - { 135 - int error; 136 - 137 - error = himax_bus_read(ts, address, dst, sizeof(dst)); 138 - if (error) 139 - return error; 140 - 141 - return 0; 142 - } 143 - 144 133 static void himax_reset(struct himax_ts_data *ts) 145 134 { 146 135 gpiod_set_value_cansleep(ts->gpiod_rst, 1); ··· 149 160 { 150 161 int error; 151 162 152 - error = himax_read_mcu(ts, HIMAX_REG_ADDR_ICID, product_id); 163 + error = himax_bus_read(ts, HIMAX_REG_ADDR_ICID, product_id, 164 + sizeof(*product_id)); 153 165 if (error) 154 166 return error; 155 167