diff options
author | KT Liao <kt.liao@emc.com.tw> | 2017-08-19 02:49:53 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-08-19 03:07:02 +0300 |
commit | 991368818df4a50f50d2ce673b308f946ed635a6 (patch) | |
tree | 753911079edc4d049a805a1c82d64d93359fd727 /drivers/input/mouse/elan_i2c_smbus.c | |
parent | a2ae5f0afde34eaecf3fbb13223b772ceaec6227 (diff) | |
download | linux-991368818df4a50f50d2ce673b308f946ed635a6.tar.xz |
Input: elan_i2c - support touchpads with two physical buttons
Elan touchpads on Asus ROG G752xx series laptops have 2 physical buttons.
Luckily we can query the touchpad to see if it is a clickpad variant and
adjust the behavior accordingly.
Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Tested-by: Maxime Bellengé <maxime.bellenge@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/elan_i2c_smbus.c')
-rw-r--r-- | drivers/input/mouse/elan_i2c_smbus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c index df7a57ca7331..29f99529b187 100644 --- a/drivers/input/mouse/elan_i2c_smbus.c +++ b/drivers/input/mouse/elan_i2c_smbus.c @@ -166,7 +166,8 @@ static int elan_smbus_get_version(struct i2c_client *client, } static int elan_smbus_get_sm_version(struct i2c_client *client, - u16 *ic_type, u8 *version) + u16 *ic_type, u8 *version, + u8 *clickpad) { int error; u8 val[3]; @@ -180,6 +181,7 @@ static int elan_smbus_get_sm_version(struct i2c_client *client, *version = val[0]; *ic_type = val[1]; + *clickpad = val[0] & 0x10; return 0; } |