Skip to content

Commit 5f0ee9d

Browse files
jwrdegoededtor
authored andcommitted
Input: elantech - fix detection of touchpads where the revision matches a known rate
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. Cc: [email protected] 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]>
1 parent 77b071e commit 5f0ee9d

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
@@ -1376,10 +1376,11 @@ static bool elantech_is_signature_valid(const unsigned char *param)
13761376
return true;
13771377

13781378
/*
1379-
* Some models have a revision higher then 20. Meaning param[2] may
1380-
* be 10 or 20, skip the rates check for these.
1379+
* Some hw_version >= 4 models have a revision higher then 20. Meaning
1380+
* that param[2] may be 10 or 20, skip the rates check for these.
13811381
*/
1382-
if (param[0] == 0x46 && (param[1] & 0xef) == 0x0f && param[2] < 40)
1382+
if ((param[0] & 0x0f) >= 0x06 && (param[1] & 0xaf) == 0x0f &&
1383+
param[2] < 40)
13831384
return true;
13841385

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

0 commit comments

Comments
 (0)