linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "simba.hsu" <simba.hsu@raydium.corp-partner.google.com>
Cc: simba.hsu@rad-ic.com, furquan@google.com, seanpaul@chromium.org,
	rrangle@chromium.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, KP.li@rad-ic.com,
	jeffrey.lin@rad-ic.com
Subject: Re: [PATCH] Input: raydium_i2c_ts - read device version in bootloader mode
Date: Sun, 5 Sep 2021 19:56:27 -0700	[thread overview]
Message-ID: <YTWDW0bt32GRp3PU@google.com> (raw)
In-Reply-To: <20210818063644.8654-1-simba.hsu@rad-ic.com>

On Wed, Aug 18, 2021 at 02:36:44PM +0800, simba.hsu wrote:
> Add support reading device ID when controller is in bootloader
> mode, which may happen if firmware update has been interrupted.
> 
> Signed-off-by: simba.hsu <simba.hsu@rad-ic.com>
> ---
>  drivers/input/touchscreen/raydium_i2c_ts.c | 52 ++++++++++++++++++----
>  1 file changed, 44 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c
> index 4d2d22a86977..d3f8cc3285a2 100644
> --- a/drivers/input/touchscreen/raydium_i2c_ts.c
> +++ b/drivers/input/touchscreen/raydium_i2c_ts.c
> @@ -36,7 +36,8 @@
>  #define RM_CMD_BOOT_CHK		0x33		/* send data check */
>  #define RM_CMD_BOOT_READ	0x44		/* send wait bl data ready*/
>  
> -#define RM_BOOT_RDY		0xFF		/* bl data ready */
> +#define RM_BOOT_RDY		0xFF			/* bl data ready */
> +#define RM_BOOT_CMD_READHWID	0x0E	/* read hwid */
>  
>  /* I2C main commands */
>  #define RM_CMD_QUERY_BANK	0x2B
> @@ -155,6 +156,7 @@ static int raydium_i2c_xfer(struct i2c_client *client, u32 addr,
>  	 * sent first. Else, skip the header i.e. xfer[0].
>  	 */
>  	int xfer_start_idx = (addr > 0xff) ? 0 : 1;
> +
>  	xfer_count -= xfer_start_idx;

I dropped this unrelated chunk, made couple of cosmetic changes and
applied, thank you.

-- 
Dmitry

  reply	other threads:[~2021-09-06  2:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  6:36 [PATCH] Input: raydium_i2c_ts - read device version in bootloader mode simba.hsu
2021-09-06  2:56 ` Dmitry Torokhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-24  8:39 simba.hsu
2021-06-02  9:46 simba.hsu

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=YTWDW0bt32GRp3PU@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=KP.li@rad-ic.com \
    --cc=furquan@google.com \
    --cc=jeffrey.lin@rad-ic.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrangle@chromium.org \
    --cc=seanpaul@chromium.org \
    --cc=simba.hsu@rad-ic.com \
    --cc=simba.hsu@raydium.corp-partner.google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).