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

Pull input fixes from Dmitry Torokhov:

- a reworked way for handling reset delay on SMBus-connected Synaptics
touchpads (the original one, while being correct, uncovered an old
bug in fallback to PS/2 code that was fixed separately; the new one
however avoids having delay in serio port "fast" resume, and instead
has the wait in the RMI4 code)

- a fix for potential crashes when devices with Elan controllers (and
Synaptics) fall back to PS/2 code. Can't be hit without the original
patch above, but still good to have it fixed

- a couple new device IDs in xpad Xbox driver

- another quirk for Goodix driver to deal with stuff vendors put in
ACPI tables

- a fix for use-after-free on disconnect for powermate driver

- a quirk to not initialize PS/2 mouse port on Fujitsu Lifebook E5411
laptop as it makes keyboard not usable and the device uses
hid-over-i2c touchpad anyways

* tag 'input-for-v6.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: powermate - fix use-after-free in powermate_config_complete
Input: xpad - add PXN V900 support
Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport
Input: psmouse - fix fast_reconnect function for PS/2 mode
Revert "Input: psmouse - add delay when deactivating for SMBus mode"
Input: goodix - ensure int GPIO is in input for gpio_count == 1 && gpio_int_idx == 0 case
Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table
Input: xpad - add HyperX Clutch Gladiate Support

+70 -34
+4
drivers/input/joystick/xpad.c
··· 130 130 { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 }, 131 131 { 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 }, 132 132 { 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 }, 133 + { 0x03f0, 0x0495, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE }, 133 134 { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX }, 134 135 { 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX }, 135 136 { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX }, ··· 273 272 { 0x1038, 0x1430, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 }, 274 273 { 0x1038, 0x1431, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 }, 275 274 { 0x11c9, 0x55f0, "Nacon GC-100XF", 0, XTYPE_XBOX360 }, 275 + { 0x11ff, 0x0511, "PXN V900", 0, XTYPE_XBOX360 }, 276 276 { 0x1209, 0x2882, "Ardwiino Controller", 0, XTYPE_XBOX360 }, 277 277 { 0x12ab, 0x0004, "Honey Bee Xbox360 dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 278 278 { 0x12ab, 0x0301, "PDP AFTERGLOW AX.1", 0, XTYPE_XBOX360 }, ··· 461 459 { USB_INTERFACE_INFO('X', 'B', 0) }, /* Xbox USB-IF not-approved class */ 462 460 XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 controller */ 463 461 XPAD_XBOX360_VENDOR(0x03eb), /* Wooting Keyboards (Legacy) */ 462 + XPAD_XBOXONE_VENDOR(0x03f0), /* HP HyperX Xbox One controllers */ 464 463 XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster Xbox 360 controllers */ 465 464 XPAD_XBOX360_VENDOR(0x045e), /* Microsoft Xbox 360 controllers */ 466 465 XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft Xbox One controllers */ ··· 480 477 XPAD_XBOX360_VENDOR(0x1038), /* SteelSeries controllers */ 481 478 XPAD_XBOXONE_VENDOR(0x10f5), /* Turtle Beach Controllers */ 482 479 XPAD_XBOX360_VENDOR(0x11c9), /* Nacon GC100XF */ 480 + XPAD_XBOX360_VENDOR(0x11ff), /* PXN V900 */ 483 481 XPAD_XBOX360_VENDOR(0x1209), /* Ardwiino Controllers */ 484 482 XPAD_XBOX360_VENDOR(0x12ab), /* Xbox 360 dance pads */ 485 483 XPAD_XBOX360_VENDOR(0x1430), /* RedOctane Xbox 360 controllers */
+1
drivers/input/misc/powermate.c
··· 425 425 pm->requires_update = 0; 426 426 usb_kill_urb(pm->irq); 427 427 input_unregister_device(pm->input); 428 + usb_kill_urb(pm->config); 428 429 usb_free_urb(pm->irq); 429 430 usb_free_urb(pm->config); 430 431 powermate_free_buffers(interface_to_usbdev(intf), pm);
+1
drivers/input/mouse/elantech.c
··· 2114 2114 psmouse->protocol_handler = elantech_process_byte; 2115 2115 psmouse->disconnect = elantech_disconnect; 2116 2116 psmouse->reconnect = elantech_reconnect; 2117 + psmouse->fast_reconnect = NULL; 2117 2118 psmouse->pktsize = info->hw_version > 1 ? 6 : 4; 2118 2119 2119 2120 return 0;
+7 -12
drivers/input/mouse/psmouse-smbus.c
··· 5 5 6 6 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 7 7 8 - #include <linux/delay.h> 9 8 #include <linux/kernel.h> 10 9 #include <linux/module.h> 11 10 #include <linux/libps2.h> ··· 118 119 return PSMOUSE_FULL_PACKET; 119 120 } 120 121 121 - static void psmouse_activate_smbus_mode(struct psmouse_smbus_dev *smbdev) 122 - { 123 - if (smbdev->need_deactivate) { 124 - psmouse_deactivate(smbdev->psmouse); 125 - /* Give the device time to switch into SMBus mode */ 126 - msleep(30); 127 - } 128 - } 129 - 130 122 static int psmouse_smbus_reconnect(struct psmouse *psmouse) 131 123 { 132 - psmouse_activate_smbus_mode(psmouse->private); 124 + struct psmouse_smbus_dev *smbdev = psmouse->private; 125 + 126 + if (smbdev->need_deactivate) 127 + psmouse_deactivate(psmouse); 128 + 133 129 return 0; 134 130 } 135 131 ··· 257 263 } 258 264 } 259 265 260 - psmouse_activate_smbus_mode(smbdev); 266 + if (need_deactivate) 267 + psmouse_deactivate(psmouse); 261 268 262 269 psmouse->private = smbdev; 263 270 psmouse->protocol_handler = psmouse_smbus_process_byte;
+2
drivers/input/mouse/synaptics.c
··· 1623 1623 psmouse->set_rate = synaptics_set_rate; 1624 1624 psmouse->disconnect = synaptics_disconnect; 1625 1625 psmouse->reconnect = synaptics_reconnect; 1626 + psmouse->fast_reconnect = NULL; 1626 1627 psmouse->cleanup = synaptics_reset; 1627 1628 /* Synaptics can usually stay in sync without extra help */ 1628 1629 psmouse->resync_time = 0; ··· 1753 1752 psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) && 1754 1753 !SYN_CAP_EXT_BUTTONS_STICK(info->ext_cap_10); 1755 1754 const struct rmi_device_platform_data pdata = { 1755 + .reset_delay_ms = 30, 1756 1756 .sensor_pdata = { 1757 1757 .sensor_type = rmi_sensor_touchpad, 1758 1758 .axis_align.flip_y = true,
+28 -22
drivers/input/rmi4/rmi_smbus.c
··· 235 235 236 236 static int rmi_smb_enable_smbus_mode(struct rmi_smb_xport *rmi_smb) 237 237 { 238 - int retval; 238 + struct i2c_client *client = rmi_smb->client; 239 + int smbus_version; 240 + 241 + /* 242 + * psmouse driver resets the controller, we only need to wait 243 + * to give the firmware chance to fully reinitialize. 244 + */ 245 + if (rmi_smb->xport.pdata.reset_delay_ms) 246 + msleep(rmi_smb->xport.pdata.reset_delay_ms); 239 247 240 248 /* we need to get the smbus version to activate the touchpad */ 241 - retval = rmi_smb_get_version(rmi_smb); 242 - if (retval < 0) 243 - return retval; 249 + smbus_version = rmi_smb_get_version(rmi_smb); 250 + if (smbus_version < 0) 251 + return smbus_version; 252 + 253 + rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d", 254 + smbus_version); 255 + 256 + if (smbus_version != 2 && smbus_version != 3) { 257 + dev_err(&client->dev, "Unrecognized SMB version %d\n", 258 + smbus_version); 259 + return -ENODEV; 260 + } 244 261 245 262 return 0; 246 263 } ··· 270 253 rmi_smb_clear_state(rmi_smb); 271 254 272 255 /* 273 - * we do not call the actual reset command, it has to be handled in 274 - * PS/2 or there will be races between PS/2 and SMBus. 275 - * PS/2 should ensure that a psmouse_reset is called before 276 - * intializing the device and after it has been removed to be in a known 277 - * state. 256 + * We do not call the actual reset command, it has to be handled in 257 + * PS/2 or there will be races between PS/2 and SMBus. PS/2 should 258 + * ensure that a psmouse_reset is called before initializing the 259 + * device and after it has been removed to be in a known state. 278 260 */ 279 261 return rmi_smb_enable_smbus_mode(rmi_smb); 280 262 } ··· 288 272 { 289 273 struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev); 290 274 struct rmi_smb_xport *rmi_smb; 291 - int smbus_version; 292 275 int error; 293 276 294 277 if (!pdata) { ··· 326 311 rmi_smb->xport.proto_name = "smb"; 327 312 rmi_smb->xport.ops = &rmi_smb_ops; 328 313 329 - smbus_version = rmi_smb_get_version(rmi_smb); 330 - if (smbus_version < 0) 331 - return smbus_version; 332 - 333 - rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d", 334 - smbus_version); 335 - 336 - if (smbus_version != 2 && smbus_version != 3) { 337 - dev_err(&client->dev, "Unrecognized SMB version %d\n", 338 - smbus_version); 339 - return -ENODEV; 340 - } 314 + error = rmi_smb_enable_smbus_mode(rmi_smb); 315 + if (error) 316 + return error; 341 317 342 318 i2c_set_clientdata(client, rmi_smb); 343 319
+8
drivers/input/serio/i8042-acpipnpio.h
··· 619 619 .driver_data = (void *)(SERIO_QUIRK_NOMUX) 620 620 }, 621 621 { 622 + /* Fujitsu Lifebook E5411 */ 623 + .matches = { 624 + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU CLIENT COMPUTING LIMITED"), 625 + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E5411"), 626 + }, 627 + .driver_data = (void *)(SERIO_QUIRK_NOAUX) 628 + }, 629 + { 622 630 /* Gigabyte M912 */ 623 631 .matches = { 624 632 DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
+19
drivers/input/touchscreen/goodix.c
··· 900 900 dev_info(dev, "No ACPI GpioInt resource, assuming that the GPIO order is reset, int\n"); 901 901 ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO; 902 902 gpio_mapping = acpi_goodix_int_last_gpios; 903 + } else if (ts->gpio_count == 1 && ts->gpio_int_idx == 0) { 904 + /* 905 + * On newer devices there is only 1 GpioInt resource and _PS0 906 + * does the whole reset sequence for us. 907 + */ 908 + acpi_device_fix_up_power(ACPI_COMPANION(dev)); 909 + 910 + /* 911 + * Before the _PS0 call the int GPIO may have been in output 912 + * mode and the call should have put the int GPIO in input mode, 913 + * but the GPIO subsys cached state may still think it is 914 + * in output mode, causing gpiochip_lock_as_irq() failure. 915 + * 916 + * Add a mapping for the int GPIO to make the 917 + * gpiod_int = gpiod_get(..., GPIOD_IN) call succeed, 918 + * which will explicitly set the direction to input. 919 + */ 920 + ts->irq_pin_access_method = IRQ_PIN_ACCESS_NONE; 921 + gpio_mapping = acpi_goodix_int_first_gpios; 903 922 } else { 904 923 dev_warn(dev, "Unexpected ACPI resources: gpio_count %d, gpio_int_idx %d\n", 905 924 ts->gpio_count, ts->gpio_int_idx);