All of lore.kernel.org
 help / color / mirror / Atom feed
From: "simba.hsu" <simba.hsu@raydium.corp-partner.google.com>
To: dmitry.torokhov@gmail.com, furquan@google.com,
	seanpaul@chromium.org, rrangel@chromium.org,
	simba.hsu@rad-ic.com
Cc: jeffrey.lin@rad-ic.com, KP.li@rad-ic.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	"simba.hsu" <simba.hsu@raydium.corp-partner.google.com>
Subject: [PATCH] driver: input: touchscreen: modify Raydium i2c touchscreen driver
Date: Thu, 15 Apr 2021 16:58:29 +0800	[thread overview]
Message-ID: <20210415085829.1419147-1-simba.hsu@raydium.corp-partner.google.com> (raw)

This path makes auto-update available when IC's status is
Recovery mode.

Signed-off-by: simba.hsu@raydium.corp-partner.google.com
Change-Id: I5ae54896a201b949eba7514500a7e75574f5726b
---
 drivers/input/touchscreen/raydium_i2c_ts.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c
index 444479ef699e..a97403c55f75 100644
--- a/drivers/input/touchscreen/raydium_i2c_ts.c
+++ b/drivers/input/touchscreen/raydium_i2c_ts.c
@@ -298,6 +298,7 @@ static int raydium_i2c_query_ts_BL_info(struct raydium_data *ts)
 					 0x10, 0xc0, 0x01, 0x00, 0x04, 0x00};
 	int error;
 	u8 rbuf[5] = {0, 0, 0, 0, 0};
+	u32 tmpdata = 0;
 
 	error = raydium_i2c_send(client,
 				 RM_CMD_BOOT_WRT, get_hwid, sizeof(get_hwid));
@@ -315,7 +316,8 @@ static int raydium_i2c_query_ts_BL_info(struct raydium_data *ts)
 	error = raydium_i2c_read(client,
 				 RM_CMD_BOOT_CHK, rbuf, sizeof(rbuf));
 	if (!error) {
-		ts->info.hw_ver = cpu_to_le32(rbuf[1]<<24|rbuf[2]<<16|rbuf[3]<<8|rbuf[4]);
+		tmpdata = (rbuf[1]<<24|rbuf[2]<<16|rbuf[3]<<8|rbuf[4]);
+		ts->info.hw_ver = cpu_to_le32(tmpdata);
 		dev_err(&client->dev, "HWID %08X\n", ts->info.hw_ver);
 	} else {
 		ts->info.hw_ver = cpu_to_le32(0xffffffffUL);
-- 
2.25.1


             reply	other threads:[~2021-04-15  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  8:58 simba.hsu [this message]
2021-04-15 16:05 ` [PATCH] driver: input: touchscreen: modify Raydium i2c touchscreen driver Raul Rangel
2021-04-15 19:17 ` Dmitry Torokhov
2021-04-15  9:14 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=20210415085829.1419147-1-simba.hsu@raydium.corp-partner.google.com \
    --to=simba.hsu@raydium.corp-partner.google.com \
    --cc=KP.li@rad-ic.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=furquan@google.com \
    --cc=jeffrey.lin@rad-ic.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrangel@chromium.org \
    --cc=seanpaul@chromium.org \
    --cc=simba.hsu@rad-ic.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 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.