Skip to content

Commit d21ff5d

Browse files
bentissdtor
authored andcommitted
Input: elantech - disable elan-i2c for P52 and P72
The current implementation of elan_i2c is known to not support those 2 laptops. A proper fix is to tweak both elantech and elan_i2c to transmit the correct information from PS/2, which would make a bad candidate for stable. So to give us some time for fixing the root of the problem, disable elan_i2c for the devices we know are not behaving properly. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803600 Link: https://bugs.archlinux.org/task/59714 Fixes: df07723 Input: elantech - detect new ICs and setup Host Notify for them Cc: [email protected] # v4.18+ Signed-off-by: Benjamin Tissoires <[email protected]> Acked-by: Peter Hutterer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent ca50472 commit d21ff5d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

drivers/input/mouse/elantech.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,18 @@ static int elantech_smbus = IS_ENABLED(CONFIG_MOUSE_ELAN_I2C_SMBUS) ?
17671767
module_param_named(elantech_smbus, elantech_smbus, int, 0644);
17681768
MODULE_PARM_DESC(elantech_smbus, "Use a secondary bus for the Elantech device.");
17691769

1770+
static const char * const i2c_blacklist_pnp_ids[] = {
1771+
/*
1772+
* These are known to not be working properly as bits are missing
1773+
* in elan_i2c.
1774+
*/
1775+
"LEN2131", /* ThinkPad P52 w/ NFC */
1776+
"LEN2132", /* ThinkPad P52 */
1777+
"LEN2133", /* ThinkPad P72 w/ NFC */
1778+
"LEN2134", /* ThinkPad P72 */
1779+
NULL
1780+
};
1781+
17701782
static int elantech_create_smbus(struct psmouse *psmouse,
17711783
struct elantech_device_info *info,
17721784
bool leave_breadcrumbs)
@@ -1802,10 +1814,12 @@ static int elantech_setup_smbus(struct psmouse *psmouse,
18021814

18031815
if (elantech_smbus == ELANTECH_SMBUS_NOT_SET) {
18041816
/*
1805-
* New ICs are enabled by default.
1817+
* New ICs are enabled by default, unless mentioned in
1818+
* i2c_blacklist_pnp_ids.
18061819
* Old ICs are up to the user to decide.
18071820
*/
1808-
if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version))
1821+
if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) ||
1822+
psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids))
18091823
return -ENXIO;
18101824
}
18111825

0 commit comments

Comments
 (0)