All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "james.chen" <james.chen@emc.com.tw>
Cc: Herman Lin <herman.lin@emc.com.tw>,
	linux-input@vger.kernel.org, charliemooney@chromium.org
Subject: Re: [PATCH] CHROMIUM: elants_i2c.c: Disable idle mode before firmware upgrade procedure.
Date: Mon, 20 Jul 2015 11:17:31 -0700	[thread overview]
Message-ID: <20150720181731.GA37139@dtor-ws> (raw)
In-Reply-To: <1436520352-10404-1-git-send-email-james.chen@emc.com.tw>

Hi James,

On Fri, Jul 10, 2015 at 05:25:52PM +0800, james.chen wrote:
> 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.

Please add your "signed-off-by" to the patch so that I can apply it.

Thank you!

> ---
>  drivers/input/touchscreen/elants_i2c.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> 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;
>  	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
> 

-- 
Dmitry

  reply	other threads:[~2015-07-20 18:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10  9:25 [PATCH] CHROMIUM: elants_i2c.c: Disable idle mode before firmware upgrade procedure james.chen
2015-07-20 18:17 ` Dmitry Torokhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-07-21  2:09 james.chen
2015-07-21  2:23 ` James Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150720181731.GA37139@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=charliemooney@chromium.org \
    --cc=herman.lin@emc.com.tw \
    --cc=james.chen@emc.com.tw \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.