All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: elantech - Fix V4 report decoding for module with middle key
@ 2018-05-28 11:33 KT Liao
  2018-05-29 18:05 ` Dmitry Torokhov
  0 siblings, 1 reply; 12+ messages in thread
From: KT Liao @ 2018-05-28 11:33 UTC (permalink / raw)
  To: linux-kernel, linux-input, dmitry.torokhov, ulrik.debie-os
  Cc: phoenix, kt.liao, aaron.ma, josh.chen

Some touchpad has middle key and it will be indicated in bit 2 of packet[0].
We need to fix V4 formation's byte mask to prevent error decoding.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
---
 drivers/input/mouse/elantech.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index fb4d902..f39dc66 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -799,7 +799,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
 	else if (ic_version == 7 && etd->info.samples[1] == 0x2A)
 		sanity_check = ((packet[3] & 0x1c) == 0x10);
 	else
-		sanity_check = ((packet[0] & 0x0c) == 0x04 &&
+		sanity_check = ((packet[0] & 0x08) == 0x00 &&
 				(packet[3] & 0x1c) == 0x10);
 
 	if (!sanity_check)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-07-02 16:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-28 11:33 [PATCH] Input: elantech - Fix V4 report decoding for module with middle key KT Liao
2018-05-29 18:05 ` Dmitry Torokhov
2018-05-30  7:03   ` 廖崇榮
2018-05-30  7:03     ` 廖崇榮
2018-06-22  0:16     ` 'Dmitry Torokhov'
2018-07-01 23:30       ` Linus Torvalds
2018-07-01 23:44         ` Dmitry Torokhov
2018-07-02  0:00           ` Linus Torvalds
2018-07-02  0:12             ` Dmitry Torokhov
2018-07-02 12:12               ` Kalle Valo
2018-07-02 15:32                 ` Randy Dunlap
2018-07-02 16:31                 ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.