summaryrefslogtreecommitdiff
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorDuson Lin <dusonlin@emc.com.tw>2015-09-03 09:46:45 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-09-03 10:00:16 -0700
commit58f1eae48e5372200553de07b5ecc7574803ee91 (patch)
tree78f3e9dd4eb025663cf7ec777aa17cec7dff6e08 /drivers/input/mouse
parentd6f5aef298b5e5bd12e5d3ef111a4d0fc727ca70 (diff)
Input: elan_i2c - use iap_version to get firmware information
When driver is in IAP mode ic_type query may return 0xff. However iap_version will always be valid, so let's use it to determine parameters of the firmware that the controller is supposed to accept. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/elan_i2c_core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index d4a38caa1ab1..e2b7420eed97 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -4,7 +4,7 @@
* Copyright (c) 2013 ELAN Microelectronics Corp.
*
* Author: 林政維 (Duson Lin) <dusonlin@emc.com.tw>
- * Version: 1.5.9
+ * Version: 1.6.0
*
* Based on cyapa driver:
* copyright (c) 2011-2012 Cypress Semiconductor, Inc.
@@ -40,7 +40,7 @@
#include "elan_i2c.h"
#define DRIVER_NAME "elan_i2c"
-#define ELAN_DRIVER_VERSION "1.5.9"
+#define ELAN_DRIVER_VERSION "1.6.0"
#define ETP_MAX_PRESSURE 255
#define ETP_FWIDTH_REDUCE 90
#define ETP_FINGER_WIDTH 15
@@ -94,10 +94,10 @@ struct elan_tp_data {
bool baseline_ready;
};
-static int elan_get_fwinfo(u8 ic_type, u16 *validpage_count,
+static int elan_get_fwinfo(u8 iap_version, u16 *validpage_count,
u16 *signature_address)
{
- switch(ic_type) {
+ switch (iap_version) {
case 0x08:
*validpage_count = 512;
break;
@@ -264,11 +264,11 @@ static int elan_query_device_info(struct elan_tp_data *data)
if (error)
return error;
- error = elan_get_fwinfo(data->ic_type, &data->fw_validpage_count,
+ error = elan_get_fwinfo(data->iap_version, &data->fw_validpage_count,
&data->fw_signature_address);
if (error) {
dev_err(&data->client->dev,
- "unknown ic type %d\n", data->ic_type);
+ "unknown iap version %d\n", data->iap_version);
return error;
}