summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorJingle Wu <jingle.wu@emc.com.tw>2020-07-17 07:55:57 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-07-18 02:36:02 +0200
commit8d73ec7411e084de8266bc3cb031d85a222458be (patch)
tree54f9ecf54f6ad1dba59ba8ccf4cdbbab79adeb78 /drivers/input/mouse
parentInput: elan_i2c - handle firmware updated on newer ICs (diff)
downloadlinux-8d73ec7411e084de8266bc3cb031d85a222458be.tar.xz
linux-8d73ec7411e084de8266bc3cb031d85a222458be.zip
Input: elan_i2c - add firmware update info for ICs 0x11, 0x13, 0x14
This adds firmware size and page sizes for ic types 0x11, 0x13 and 0x14. IC 0x14 uses 512-byte firmware page size. Signed-off-by: Jingle Wu <jingle.wu@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.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index e0f42def99aa..5c933e16abc1 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -127,6 +127,15 @@ static int elan_get_fwinfo(u16 ic_type, u8 iap_version, u16 *validpage_count,
case 0x10:
*validpage_count = 1024;
break;
+ case 0x11:
+ *validpage_count = 1280;
+ break;
+ case 0x13:
+ *validpage_count = 2048;
+ break;
+ case 0x14:
+ *validpage_count = 1024;
+ break;
default:
/* unknown ic type clear value */
*validpage_count = 0;
@@ -138,7 +147,10 @@ static int elan_get_fwinfo(u16 ic_type, u8 iap_version, u16 *validpage_count,
*signature_address =
(*validpage_count * ETP_FW_PAGE_SIZE) - ETP_FW_SIGNATURE_SIZE;
- if (ic_type >= 0x0D && iap_version >= 1) {
+ if (ic_type == 0x14 && iap_version >= 2) {
+ *validpage_count /= 8;
+ *page_size = ETP_FW_PAGE_SIZE_512;
+ } else if (ic_type >= 0x0D && iap_version >= 1) {
*validpage_count /= 2;
*page_size = ETP_FW_PAGE_SIZE_128;
} else {