Input updates for v6.10-rc5
- fixes for ili210x and elantech drivers - new products IDs added to xpad controller driver - a tweak to i8042 driver to always keep keyboard in Ayaneo Kun handheld in raw mode - populated "id_table" in ads7846 touchscreen driver to make sure non-OF instantiated devices can properly determine the model data. -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZnm3BgAKCRBAj56VGEWX nBEoAP0U+pcUU4wFKM5XcLgtH6n5xjk6mll9baeW6o+vDg0PagD/c2jEHn+XYe9R o4QMNEqJDs3TwTg3xHxiezfKB3eLdwo= =yK5H -----END PGP SIGNATURE----- Merge tag 'input-for-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - fixes for ili210x and elantech drivers - new products IDs added to xpad controller driver - a tweak to i8042 driver to always keep keyboard in Ayaneo Kun handheld in raw mode - populated "id_table" in ads7846 touchscreen driver to make sure non-OF instantiated devices can properly determine the model data. * tag 'input-for-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ads7846 - use spi_device_id table Input: xpad - add support for ASUS ROG RAIKIRI PRO Input: ili210x - fix ili251x_read_touch_data() return value Input: i8042 - add Ayaneo Kun to i8042 quirk table Input: elantech - fix touchpad state on resume for Lenovo N24
This commit is contained in:
commit
55027e6899
@ -209,6 +209,7 @@ static const struct xpad_device {
|
||||
{ 0x0738, 0xf738, "Super SFIV FightStick TE S", 0, XTYPE_XBOX360 },
|
||||
{ 0x07ff, 0xffff, "Mad Catz GamePad", 0, XTYPE_XBOX360 },
|
||||
{ 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", 0, XTYPE_XBOXONE },
|
||||
{ 0x0b05, 0x1abb, "ASUS ROG RAIKIRI PRO", 0, XTYPE_XBOXONE },
|
||||
{ 0x0c12, 0x0005, "Intec wireless", 0, XTYPE_XBOX },
|
||||
{ 0x0c12, 0x8801, "Nyko Xbox Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
|
||||
|
@ -1476,16 +1476,47 @@ static void elantech_disconnect(struct psmouse *psmouse)
|
||||
psmouse->private = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some hw_version 4 models fail to properly activate absolute mode on
|
||||
* resume without going through disable/enable cycle.
|
||||
*/
|
||||
static const struct dmi_system_id elantech_needs_reenable[] = {
|
||||
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
|
||||
{
|
||||
/* Lenovo N24 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "81AF"),
|
||||
},
|
||||
},
|
||||
#endif
|
||||
{ }
|
||||
};
|
||||
|
||||
/*
|
||||
* Put the touchpad back into absolute mode when reconnecting
|
||||
*/
|
||||
static int elantech_reconnect(struct psmouse *psmouse)
|
||||
{
|
||||
int err;
|
||||
|
||||
psmouse_reset(psmouse);
|
||||
|
||||
if (elantech_detect(psmouse, 0))
|
||||
return -1;
|
||||
|
||||
if (dmi_check_system(elantech_needs_reenable)) {
|
||||
err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE);
|
||||
if (err)
|
||||
psmouse_warn(psmouse, "failed to deactivate mouse on %s: %d\n",
|
||||
psmouse->ps2dev.serio->phys, err);
|
||||
|
||||
err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
|
||||
if (err)
|
||||
psmouse_warn(psmouse, "failed to reactivate mouse on %s: %d\n",
|
||||
psmouse->ps2dev.serio->phys, err);
|
||||
}
|
||||
|
||||
if (elantech_set_absolute_mode(psmouse)) {
|
||||
psmouse_err(psmouse,
|
||||
"failed to put touchpad back into absolute mode.\n");
|
||||
|
@ -76,7 +76,7 @@ static inline void i8042_write_command(int val)
|
||||
#define SERIO_QUIRK_PROBE_DEFER BIT(5)
|
||||
#define SERIO_QUIRK_RESET_ALWAYS BIT(6)
|
||||
#define SERIO_QUIRK_RESET_NEVER BIT(7)
|
||||
#define SERIO_QUIRK_DIECT BIT(8)
|
||||
#define SERIO_QUIRK_DIRECT BIT(8)
|
||||
#define SERIO_QUIRK_DUMBKBD BIT(9)
|
||||
#define SERIO_QUIRK_NOLOOP BIT(10)
|
||||
#define SERIO_QUIRK_NOTIMEOUT BIT(11)
|
||||
@ -1332,6 +1332,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
|
||||
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
|
||||
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
|
||||
},
|
||||
{
|
||||
/*
|
||||
* The Ayaneo Kun is a handheld device where some the buttons
|
||||
* are handled by an AT keyboard. The keyboard is usually
|
||||
* detected as raw, but sometimes, usually after a cold boot,
|
||||
* it is detected as translated. Make sure that the keyboard
|
||||
* is always in raw mode.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "KUN"),
|
||||
},
|
||||
.driver_data = (void *)(SERIO_QUIRK_DIRECT)
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
@ -1655,7 +1669,7 @@ static void __init i8042_check_quirks(void)
|
||||
if (quirks & SERIO_QUIRK_RESET_NEVER)
|
||||
i8042_reset = I8042_RESET_NEVER;
|
||||
}
|
||||
if (quirks & SERIO_QUIRK_DIECT)
|
||||
if (quirks & SERIO_QUIRK_DIRECT)
|
||||
i8042_direct = true;
|
||||
if (quirks & SERIO_QUIRK_DUMBKBD)
|
||||
i8042_dumbkbd = true;
|
||||
|
@ -1111,6 +1111,16 @@ static const struct of_device_id ads7846_dt_ids[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ads7846_dt_ids);
|
||||
|
||||
static const struct spi_device_id ads7846_spi_ids[] = {
|
||||
{ "tsc2046", 7846 },
|
||||
{ "ads7843", 7843 },
|
||||
{ "ads7845", 7845 },
|
||||
{ "ads7846", 7846 },
|
||||
{ "ads7873", 7873 },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, ads7846_spi_ids);
|
||||
|
||||
static const struct ads7846_platform_data *ads7846_get_props(struct device *dev)
|
||||
{
|
||||
struct ads7846_platform_data *pdata;
|
||||
@ -1386,10 +1396,10 @@ static struct spi_driver ads7846_driver = {
|
||||
},
|
||||
.probe = ads7846_probe,
|
||||
.remove = ads7846_remove,
|
||||
.id_table = ads7846_spi_ids,
|
||||
};
|
||||
|
||||
module_spi_driver(ads7846_driver);
|
||||
|
||||
MODULE_DESCRIPTION("ADS7846 TouchScreen Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("spi:ads7846");
|
||||
|
@ -261,8 +261,8 @@ static int ili251x_read_touch_data(struct i2c_client *client, u8 *data)
|
||||
if (!error && data[0] == 2) {
|
||||
error = i2c_master_recv(client, data + ILI251X_DATA_SIZE1,
|
||||
ILI251X_DATA_SIZE2);
|
||||
if (error >= 0 && error != ILI251X_DATA_SIZE2)
|
||||
error = -EIO;
|
||||
if (error >= 0)
|
||||
error = error == ILI251X_DATA_SIZE2 ? 0 : -EIO;
|
||||
}
|
||||
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user