Skip to content

Commit 55027e6

Browse files
committed
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
2 parents 626737a + 7c7b1be commit 55027e6

File tree

5 files changed

+61
-5
lines changed

5 files changed

+61
-5
lines changed

drivers/input/joystick/xpad.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ static const struct xpad_device {
209209
{ 0x0738, 0xf738, "Super SFIV FightStick TE S", 0, XTYPE_XBOX360 },
210210
{ 0x07ff, 0xffff, "Mad Catz GamePad", 0, XTYPE_XBOX360 },
211211
{ 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", 0, XTYPE_XBOXONE },
212+
{ 0x0b05, 0x1abb, "ASUS ROG RAIKIRI PRO", 0, XTYPE_XBOXONE },
212213
{ 0x0c12, 0x0005, "Intec wireless", 0, XTYPE_XBOX },
213214
{ 0x0c12, 0x8801, "Nyko Xbox Controller", 0, XTYPE_XBOX },
214215
{ 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },

drivers/input/mouse/elantech.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,16 +1476,47 @@ static void elantech_disconnect(struct psmouse *psmouse)
14761476
psmouse->private = NULL;
14771477
}
14781478

1479+
/*
1480+
* Some hw_version 4 models fail to properly activate absolute mode on
1481+
* resume without going through disable/enable cycle.
1482+
*/
1483+
static const struct dmi_system_id elantech_needs_reenable[] = {
1484+
#if defined(CONFIG_DMI) && defined(CONFIG_X86)
1485+
{
1486+
/* Lenovo N24 */
1487+
.matches = {
1488+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1489+
DMI_MATCH(DMI_PRODUCT_NAME, "81AF"),
1490+
},
1491+
},
1492+
#endif
1493+
{ }
1494+
};
1495+
14791496
/*
14801497
* Put the touchpad back into absolute mode when reconnecting
14811498
*/
14821499
static int elantech_reconnect(struct psmouse *psmouse)
14831500
{
1501+
int err;
1502+
14841503
psmouse_reset(psmouse);
14851504

14861505
if (elantech_detect(psmouse, 0))
14871506
return -1;
14881507

1508+
if (dmi_check_system(elantech_needs_reenable)) {
1509+
err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE);
1510+
if (err)
1511+
psmouse_warn(psmouse, "failed to deactivate mouse on %s: %d\n",
1512+
psmouse->ps2dev.serio->phys, err);
1513+
1514+
err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
1515+
if (err)
1516+
psmouse_warn(psmouse, "failed to reactivate mouse on %s: %d\n",
1517+
psmouse->ps2dev.serio->phys, err);
1518+
}
1519+
14891520
if (elantech_set_absolute_mode(psmouse)) {
14901521
psmouse_err(psmouse,
14911522
"failed to put touchpad back into absolute mode.\n");

drivers/input/serio/i8042-acpipnpio.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static inline void i8042_write_command(int val)
7676
#define SERIO_QUIRK_PROBE_DEFER BIT(5)
7777
#define SERIO_QUIRK_RESET_ALWAYS BIT(6)
7878
#define SERIO_QUIRK_RESET_NEVER BIT(7)
79-
#define SERIO_QUIRK_DIECT BIT(8)
79+
#define SERIO_QUIRK_DIRECT BIT(8)
8080
#define SERIO_QUIRK_DUMBKBD BIT(9)
8181
#define SERIO_QUIRK_NOLOOP BIT(10)
8282
#define SERIO_QUIRK_NOTIMEOUT BIT(11)
@@ -1332,6 +1332,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
13321332
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
13331333
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
13341334
},
1335+
{
1336+
/*
1337+
* The Ayaneo Kun is a handheld device where some the buttons
1338+
* are handled by an AT keyboard. The keyboard is usually
1339+
* detected as raw, but sometimes, usually after a cold boot,
1340+
* it is detected as translated. Make sure that the keyboard
1341+
* is always in raw mode.
1342+
*/
1343+
.matches = {
1344+
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
1345+
DMI_MATCH(DMI_BOARD_NAME, "KUN"),
1346+
},
1347+
.driver_data = (void *)(SERIO_QUIRK_DIRECT)
1348+
},
13351349
{ }
13361350
};
13371351

@@ -1655,7 +1669,7 @@ static void __init i8042_check_quirks(void)
16551669
if (quirks & SERIO_QUIRK_RESET_NEVER)
16561670
i8042_reset = I8042_RESET_NEVER;
16571671
}
1658-
if (quirks & SERIO_QUIRK_DIECT)
1672+
if (quirks & SERIO_QUIRK_DIRECT)
16591673
i8042_direct = true;
16601674
if (quirks & SERIO_QUIRK_DUMBKBD)
16611675
i8042_dumbkbd = true;

drivers/input/touchscreen/ads7846.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,16 @@ static const struct of_device_id ads7846_dt_ids[] = {
11111111
};
11121112
MODULE_DEVICE_TABLE(of, ads7846_dt_ids);
11131113

1114+
static const struct spi_device_id ads7846_spi_ids[] = {
1115+
{ "tsc2046", 7846 },
1116+
{ "ads7843", 7843 },
1117+
{ "ads7845", 7845 },
1118+
{ "ads7846", 7846 },
1119+
{ "ads7873", 7873 },
1120+
{ },
1121+
};
1122+
MODULE_DEVICE_TABLE(spi, ads7846_spi_ids);
1123+
11141124
static const struct ads7846_platform_data *ads7846_get_props(struct device *dev)
11151125
{
11161126
struct ads7846_platform_data *pdata;
@@ -1386,10 +1396,10 @@ static struct spi_driver ads7846_driver = {
13861396
},
13871397
.probe = ads7846_probe,
13881398
.remove = ads7846_remove,
1399+
.id_table = ads7846_spi_ids,
13891400
};
13901401

13911402
module_spi_driver(ads7846_driver);
13921403

13931404
MODULE_DESCRIPTION("ADS7846 TouchScreen Driver");
13941405
MODULE_LICENSE("GPL");
1395-
MODULE_ALIAS("spi:ads7846");

drivers/input/touchscreen/ili210x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ static int ili251x_read_touch_data(struct i2c_client *client, u8 *data)
261261
if (!error && data[0] == 2) {
262262
error = i2c_master_recv(client, data + ILI251X_DATA_SIZE1,
263263
ILI251X_DATA_SIZE2);
264-
if (error >= 0 && error != ILI251X_DATA_SIZE2)
265-
error = -EIO;
264+
if (error >= 0)
265+
error = error == ILI251X_DATA_SIZE2 ? 0 : -EIO;
266266
}
267267

268268
return error;

0 commit comments

Comments
 (0)