Input: elantech - fix protocol errors for some trackpoints in SMBus mode
authorjingle.wu <jingle.wu@emc.com.tw>
Fri, 11 Dec 2020 07:49:16 +0000 (23:49 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 11:34:03 +0000 (12:34 +0100)
commitdde807b4a44273fa5f62c0cb308295e6d6642550
tree3ad538365f070357e7eb6b9759d3f3bd9ba571bc
parentd00a97dddce6df248e4d00246a29288958d7dc12
Input: elantech - fix protocol errors for some trackpoints in SMBus mode

commit e4c9062717feda88900b566463228d1c4910af6d upstream.

There are some version of Elan trackpads that send incorrect data when
in SMbus mode, unless they are switched to use 0x5f reports instead of
standard 0x5e. This patch implements querying device to retrieve chips
identifying data, and switching it, when needed to the alternative
report.

Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw>
Link: https://lore.kernel.org/r/20201211071531.32413-1-jingle.wu@emc.com.tw
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/mouse/elantech.c
drivers/input/mouse/elantech.h