projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2418fc
)
Input: elantech - fix detection of touchpad on ASUS s301l
author
Hans de Goede
<
[email protected]
>
Mon, 8 Sep 2014 21:39:52 +0000
(14:39 -0700)
committer
Dmitry Torokhov
<
[email protected]
>
Mon, 8 Sep 2014 21:58:11 +0000
(14:58 -0700)
Adjust Elantech signature validation to account fo rnewer models of
touchpads.
Cc:
[email protected]
Reported-and-tested-by: Màrius Monton <
[email protected]
>
Signed-off-by: Hans de Goede <
[email protected]
>
Signed-off-by: Dmitry Torokhov <
[email protected]
>
drivers/input/mouse/elantech.c
patch
|
blob
|
history
diff --git
a/drivers/input/mouse/elantech.c
b/drivers/input/mouse/elantech.c
index da51738eb59e712067cd5d4db8b85a3e112739fa..d71bd3635de1dd32b84d1ad518d62615e3ad6fbe 100644
(file)
--- a/
drivers/input/mouse/elantech.c
+++ b/
drivers/input/mouse/elantech.c
@@
-1331,6
+1331,13
@@
static bool elantech_is_signature_valid(const unsigned char *param)
if (param[1] == 0)
return true;
+ /*
+ * Some models have a revision higher then 20. Meaning param[2] may
+ * be 10 or 20, skip the rates check for these.
+ */
+ if (param[0] == 0x46 && (param[1] & 0xef) == 0x0f && param[2] < 40)
+ return true;
+
for (i = 0; i < ARRAY_SIZE(rates); i++)
if (param[2] == rates[i])
return false;