aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mouse/elan_i2c_core.c
diff options
context:
space:
mode:
authorMatjaz Hegedic <matjaz.hegedic@gmail.com>2017-03-10 14:33:09 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-30 09:41:22 +0200
commit3c9da7cfb7cf8528fb226348bc2da4b4bb274e39 (patch)
tree10b029ba1085c2ebd3ef3678812733d713b55a73 /drivers/input/mouse/elan_i2c_core.c
parent4ccef6bd3a0212f0172428afe7ad4aa3b3601dbf (diff)
Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw
commit 92ef6f97a66e580189a41a132d0f8a9f78d6ddce upstream. EeeBook X205TA is yet another ASUS device with a special touchpad firmware that needs to be accounted for during initialization, or else the touchpad will go into an invalid state upon suspend/resume. Adding the appropriate ic_type and product_id check fixes the problem. Signed-off-by: Matjaz Hegedic <matjaz.hegedic@gmail.com> Acked-by: KT Liao <kt.liao@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/mouse/elan_i2c_core.c')
-rw-r--r--drivers/input/mouse/elan_i2c_core.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index ed1935f300a7..da5458dfb1e3 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -218,17 +218,19 @@ static int elan_query_product(struct elan_tp_data *data)
static int elan_check_ASUS_special_fw(struct elan_tp_data *data)
{
- if (data->ic_type != 0x0E)
- return false;
-
- switch (data->product_id) {
- case 0x05 ... 0x07:
- case 0x09:
- case 0x13:
+ if (data->ic_type == 0x0E) {
+ switch (data->product_id) {
+ case 0x05 ... 0x07:
+ case 0x09:
+ case 0x13:
+ return true;
+ }
+ } else if (data->ic_type == 0x08 && data->product_id == 0x26) {
+ /* ASUS EeeBook X205TA */
return true;
- default:
- return false;
}
+
+ return false;
}
static int __elan_initialize(struct elan_tp_data *data)