diff mbox

CHROMIUM: elants_i2c.c: Disable idle mode before firmware upgrade procedure.

Message ID 001601d0c35c$461b5bb0$d2521310$@emc.com.tw (mailing list archive)
State New, archived
Headers show

Commit Message

james.chen July 21, 2015, 2:23 a.m. UTC
Dear all:

Sorry for mistyped.
Please abandon this patch.

And review next patch as shown in below.
[PATCH 2/2] CHROMIUM: elants_i2c.c: Disable idle mode before firmware
upgrade procedure.


-----Original Message-----
From: linux-input-owner@vger.kernel.org
[mailto:linux-input-owner@vger.kernel.org] On Behalf Of james.chen
Sent: Tuesday, July 21, 2015 10:10 AM
To: Dmitry Torokhov; Herman Lin; linux-input@vger.kernel.org;
charliemooney@chromium.org
Cc: james.chen
Subject: [PATCH] CHROMIUM: elants_i2c.c: Disable idle mode before firmware
upgrade procedure.

From: "james.chen" <james.chen@emc.com.tw>

This patch is disable idle mode before firmware upgrade procedure.

BUG=chrome-os-partner:39373
TEST= Test Elan touchscreen on cyan project(kernel 3.18) without problems.
---
 drivers/input/touchscreen/elants_i2c.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

 	int page, n_fw_pages;
@@ -617,8 +618,13 @@ static int elants_i2c_do_update_firmware(struct
i2c_client *client,
 	} else {
 		/* Start IAP Procedure */
 		dev_dbg(&client->dev, "Normal IAP procedure\n");
+		/* Close idle mode */
+		error = elants_i2c_send(client, close_idle,
sizeof(close_idle));
+		if (error)
+			dev_err(&client->dev, "Failed close idle: %d\n",
error);
+		msleep(60);
 		elants_i2c_sw_reset(client);
-
+		msleep(20);
 		error = elants_i2c_send(client, enter_iap,
sizeof(enter_iap));
 	}
 
--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/touchscreen/elants_i2c.c
b/drivers/input/touchscreen/elants_i2c.c
index 0efd766..6d3570e 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -605,6 +605,7 @@  static int elants_i2c_do_update_firmware(struct
i2c_client *client,
 	const u8 enter_iap[] = { 0x45, 0x49, 0x41, 0x50 };
 	const u8 enter_iap2[] = { 0x54, 0x00, 0x12, 0x34 };
 	const u8 iap_ack[] = { 0x55, 0xaa, 0x33, 0xcc };
+	const u8 close_idle[] = {0x54, 0x2c, 0x01, 0x01};
 	u8 buf[HEADER_SIZE];
 	u16 send_id;