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 branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input subsystem fixes from Dmitry Torokhov:

- a couple of regression fixes in synaptics and axp20x-pek drivers

- try to ease transition from PS/2 to RMI for Synaptics touchpad users
by ensuring we do not try to activate RMI mode when RMI SMBus support
is not enabled, and nag users a bit to enable it

- plus a couple of other changes that seemed worthwhile for this
release

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: axp20x-pek - switch to acpi_dev_present and check for ACPI0011 too
Input: axp20x-pek - only check for "INTCFD9" ACPI device on Cherry Trail
Input: tm2-touchkey - use LEN_ON as boolean value instead of LED_FULL
Input: synaptics - tell users to report when they should be using rmi-smbus
Input: synaptics - warn the users when there is a better mode
Input: synaptics - keep PS/2 around when RMI4_SMB is not enabled
Input: synaptics - clear device info before filling in
Input: silead - disable interrupt during suspend

+69 -17
+1 -1
drivers/input/keyboard/tm2-touchkey.c
··· 213 213 /* led device */ 214 214 touchkey->led_dev.name = TM2_TOUCHKEY_DEV_NAME; 215 215 touchkey->led_dev.brightness = LED_FULL; 216 - touchkey->led_dev.max_brightness = LED_FULL; 216 + touchkey->led_dev.max_brightness = LED_ON; 217 217 touchkey->led_dev.brightness_set = tm2_touchkey_led_brightness_set; 218 218 219 219 error = devm_led_classdev_register(&client->dev, &touchkey->led_dev);
+37 -7
drivers/input/misc/axp20x-pek.c
··· 256 256 return 0; 257 257 } 258 258 259 + #ifdef CONFIG_ACPI 260 + static bool axp20x_pek_should_register_input(struct axp20x_pek *axp20x_pek, 261 + struct platform_device *pdev) 262 + { 263 + unsigned long long hrv = 0; 264 + acpi_status status; 265 + 266 + if (IS_ENABLED(CONFIG_INPUT_SOC_BUTTON_ARRAY) && 267 + axp20x_pek->axp20x->variant == AXP288_ID) { 268 + status = acpi_evaluate_integer(ACPI_HANDLE(pdev->dev.parent), 269 + "_HRV", NULL, &hrv); 270 + if (ACPI_FAILURE(status)) 271 + dev_err(&pdev->dev, "Failed to get PMIC hardware revision\n"); 272 + 273 + /* 274 + * On Cherry Trail platforms (hrv == 3), do not register the 275 + * input device if there is an "INTCFD9" or "ACPI0011" gpio 276 + * button ACPI device, as that handles the power button too, 277 + * and otherwise we end up reporting all presses twice. 278 + */ 279 + if (hrv == 3 && (acpi_dev_present("INTCFD9", NULL, -1) || 280 + acpi_dev_present("ACPI0011", NULL, -1))) 281 + return false; 282 + 283 + } 284 + 285 + return true; 286 + } 287 + #else 288 + static bool axp20x_pek_should_register_input(struct axp20x_pek *axp20x_pek, 289 + struct platform_device *pdev) 290 + { 291 + return true; 292 + } 293 + #endif 294 + 259 295 static int axp20x_pek_probe(struct platform_device *pdev) 260 296 { 261 297 struct axp20x_pek *axp20x_pek; ··· 304 268 305 269 axp20x_pek->axp20x = dev_get_drvdata(pdev->dev.parent); 306 270 307 - /* 308 - * Do not register the input device if there is an "INTCFD9" 309 - * gpio button ACPI device, that handles the power button too, 310 - * and otherwise we end up reporting all presses twice. 311 - */ 312 - if (!acpi_dev_found("INTCFD9") || 313 - !IS_ENABLED(CONFIG_INPUT_SOC_BUTTON_ARRAY)) { 271 + if (axp20x_pek_should_register_input(axp20x_pek, pdev)) { 314 272 error = axp20x_pek_probe_input_device(axp20x_pek, pdev); 315 273 if (error) 316 274 return error;
+28 -9
drivers/input/mouse/synaptics.c
··· 176 176 NULL 177 177 }; 178 178 179 + static const char * const forcepad_pnp_ids[] = { 180 + "SYN300D", 181 + "SYN3014", 182 + NULL 183 + }; 184 + 179 185 /* 180 186 * Send a command to the synpatics touchpad by special commands 181 187 */ ··· 403 397 { 404 398 int error; 405 399 400 + memset(info, 0, sizeof(*info)); 401 + 406 402 error = synaptics_identify(psmouse, info); 407 403 if (error) 408 404 return error; ··· 486 478 1264, 5675, 1171, 4688 487 479 }, 488 480 { } 489 - }; 490 - 491 - /* This list has been kindly provided by Synaptics. */ 492 - static const char * const forcepad_pnp_ids[] = { 493 - "SYN300D", 494 - "SYN3014", 495 - NULL 496 481 }; 497 482 498 483 /***************************************************************************** ··· 1688 1687 SYNAPTICS_INTERTOUCH_ON, 1689 1688 }; 1690 1689 1691 - static int synaptics_intertouch = SYNAPTICS_INTERTOUCH_NOT_SET; 1690 + static int synaptics_intertouch = IS_ENABLED(CONFIG_RMI4_SMB) ? 1691 + SYNAPTICS_INTERTOUCH_NOT_SET : SYNAPTICS_INTERTOUCH_OFF; 1692 1692 module_param_named(synaptics_intertouch, synaptics_intertouch, int, 0644); 1693 1693 MODULE_PARM_DESC(synaptics_intertouch, "Use a secondary bus for the Synaptics device."); 1694 1694 ··· 1739 1737 1740 1738 if (synaptics_intertouch == SYNAPTICS_INTERTOUCH_NOT_SET) { 1741 1739 if (!psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) && 1742 - !psmouse_matches_pnp_id(psmouse, smbus_pnp_ids)) 1740 + !psmouse_matches_pnp_id(psmouse, smbus_pnp_ids)) { 1741 + 1742 + if (!psmouse_matches_pnp_id(psmouse, forcepad_pnp_ids)) 1743 + psmouse_info(psmouse, 1744 + "Your touchpad (%s) says it can support a different bus. " 1745 + "If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org.\n", 1746 + psmouse->ps2dev.serio->firmware_id); 1747 + 1743 1748 return -ENXIO; 1749 + } 1744 1750 } 1745 1751 1746 1752 psmouse_info(psmouse, "Trying to set up SMBus access\n"); ··· 1820 1810 } 1821 1811 1822 1812 if (SYN_CAP_INTERTOUCH(info.ext_cap_0c)) { 1813 + if ((!IS_ENABLED(CONFIG_RMI4_SMB) || 1814 + !IS_ENABLED(CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS)) && 1815 + /* Forcepads need F21, which is not ready */ 1816 + !psmouse_matches_pnp_id(psmouse, forcepad_pnp_ids)) { 1817 + psmouse_warn(psmouse, 1818 + "The touchpad can support a better bus than the too old PS/2 protocol. " 1819 + "Make sure MOUSE_PS2_SYNAPTICS_SMBUS and RMI4_SMB are enabled to get a better touchpad experience.\n"); 1820 + } 1821 + 1823 1822 error = synaptics_setup_intertouch(psmouse, &info, true); 1824 1823 if (!error) 1825 1824 return PSMOUSE_SYNAPTICS_SMBUS;
+3
drivers/input/touchscreen/silead.c
··· 526 526 { 527 527 struct i2c_client *client = to_i2c_client(dev); 528 528 529 + disable_irq(client->irq); 529 530 silead_ts_set_power(client, SILEAD_POWER_OFF); 530 531 return 0; 531 532 } ··· 551 550 dev_err(dev, "Resume error, status: 0x%02x\n", status); 552 551 return -ENODEV; 553 552 } 553 + 554 + enable_irq(client->irq); 554 555 555 556 return 0; 556 557 }