OSDN Git Service

Input: elan_i2c - make fetching IC type of older controllers more robust
authorJingle Wu <jingle.wu@emc.com.tw>
Thu, 16 Jul 2020 05:25:59 +0000 (22:25 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 18 Jul 2020 00:35:58 +0000 (17:35 -0700)
commitfc7c882aa9b1643273c4bb77d31163355dcbc0b8
tree31346b3244c1a5149ccce84e2696b515e37183f3
parent77da21c5d3c698f5c9ce41d57c137244bc8b7b93
Input: elan_i2c - make fetching IC type of older controllers more robust

On older controllers IC type is reported in the 2nd byte of
ETP_I2C_OSM_VERSION_CMD, however if controller's firmware is not flashed
correctly it may return incorrect data. Fortunately there is also
ETP_I2C_IAP_VERSION_P0_CMD command that can be used when controller in
either normal or IAP mode, and which is guaranteed to return accurate data,
so let's use it.

Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/elan_i2c_core.c
drivers/input/mouse/elan_i2c_i2c.c