OSDN Git Service

Input: elantech - fix absolute mode setting on some ASUS laptops
authorUlrik De Bie <ulrik.debie-os@e2big.org>
Mon, 6 Apr 2015 22:35:38 +0000 (15:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:49 +0000 (22:03 +0200)
commit53c20b74579ec9bb7b45b2208fce79df09e8bdfb
tree0d015ad135995d2fa2d91663155aa32fac8abc2c
parentca7d80c841febeb3688d5ed57660d37b4baedad5
Input: elantech - fix absolute mode setting on some ASUS laptops

commit bd884149aca61de269fd9bad83fe2a4232ffab21 upstream.

On ASUS TP500LN and X750JN, the touchpad absolute mode is reset each
time set_rate is done.

In order to fix this, we will verify the firmware version, and if it
matches the one in those laptops, the set_rate function is overloaded
with a function elantech_set_rate_restore_reg_07 that performs the
set_rate with the original function, followed by a restore of reg_07
(the register that sets the absolute mode on elantech v4 hardware).

Also the ASUS TP500LN and X750JN firmware version, capabilities, and
button constellation is added to elantech.c

Reported-and-tested-by: George Moutsopoulos <gmoutso@yahoo.co.uk>
Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/mouse/elantech.c
drivers/input/mouse/elantech.h