Skip to content

Commit 0a5506c

Browse files
jwrdegoedegregkh
authored andcommitted
Input: elantech - fix detection of touchpads where the revision matches a known rate
commit 5f0ee9d upstream. Make the check to skip the rate check more lax, so that it applies to all hw_version 4 models. This fixes the touchpad not being detected properly on Asus PU551LA laptops. Reported-and-tested-by: David Zafra Gómez <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b6c6101 commit 0a5506c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/input/mouse/elantech.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,10 +1271,11 @@ static bool elantech_is_signature_valid(const unsigned char *param)
12711271
return true;
12721272

12731273
/*
1274-
* Some models have a revision higher then 20. Meaning param[2] may
1275-
* be 10 or 20, skip the rates check for these.
1274+
* Some hw_version >= 4 models have a revision higher then 20. Meaning
1275+
* that param[2] may be 10 or 20, skip the rates check for these.
12761276
*/
1277-
if (param[0] == 0x46 && (param[1] & 0xef) == 0x0f && param[2] < 40)
1277+
if ((param[0] & 0x0f) >= 0x06 && (param[1] & 0xaf) == 0x0f &&
1278+
param[2] < 40)
12781279
return true;
12791280

12801281
for (i = 0; i < ARRAY_SIZE(rates); i++)

0 commit comments

Comments
 (0)