aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/elan_i2c_smbus.c
diff options
context:
space:
mode:
authorDuson Lin <dusonlin@emc.com.tw>2015-06-08 16:39:35 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-06-08 17:12:24 -0700
commit12018ac3d679d6a3c6c738ac805797fe4dd43912 (patch)
tree2ac3ab6688915aebb8c00bec0b543605b1dc48a9 /drivers/input/mouse/elan_i2c_smbus.c
parentInput: focaltech - report finger width to userspace (diff)
downloadlinux-dev-12018ac3d679d6a3c6c738ac805797fe4dd43912.tar.xz
linux-dev-12018ac3d679d6a3c6c738ac805797fe4dd43912.zip
Input: elan_i2c - add support for multi IC type and iap format
In order to support multiple IC types for i2c/smbus protocol, add get ic type command and use this data when checking firmware page count and signature address. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to '')
-rw-r--r--drivers/input/mouse/elan_i2c_smbus.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c
index 30ab80dbcdd6..ff36a366b2aa 100644
--- a/drivers/input/mouse/elan_i2c_smbus.c
+++ b/drivers/input/mouse/elan_i2c_smbus.c
@@ -165,7 +165,8 @@ static int elan_smbus_get_version(struct i2c_client *client,
return 0;
}
-static int elan_smbus_get_sm_version(struct i2c_client *client, u8 *version)
+static int elan_smbus_get_sm_version(struct i2c_client *client,
+ u8 *ic_type, u8 *version)
{
int error;
u8 val[3];
@@ -177,7 +178,8 @@ static int elan_smbus_get_sm_version(struct i2c_client *client, u8 *version)
return error;
}
- *version = val[0]; /* XXX Why 0 and not 2 as in IAP/FW versions? */
+ *version = val[0];
+ *ic_type = val[1];
return 0;
}