From: "jeffrey.lin" <yajohn@gmail.com>
To: dmitry.torokhov@gmail.com, groeck@chromium.org,
keith.tzeng@quantatw.com, Katherine.Hsieh@quantatw.com,
bleung@google.com
Cc: jeffrey.lin@rad-ic.com, KP.li@rad-ic.com,
albert.shieh@rad-ic.com, calvin.tseng@rad-ic.com,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: [PATCH] driver: input :touchscreen :Modify Raydium Firmware update input file
Date: Thu, 21 Dec 2017 21:51:22 +0800 [thread overview]
Message-ID: <20171221135122.345-1-jeffrey.lin@raydium.corp-partner.google.com> (raw)
Modify update firmware to accept alternative file name
Signed-off-by: jeffrey.lin <jeffrey.lin@rad-ic.com>
---
drivers/input/touchscreen/raydium_i2c_ts.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c
index a99fb5cac5a0..439d43c3519c 100644
--- a/drivers/input/touchscreen/raydium_i2c_ts.c
+++ b/drivers/input/touchscreen/raydium_i2c_ts.c
@@ -130,6 +130,7 @@ struct raydium_data {
struct gpio_desc *reset_gpio;
struct raydium_info info;
+ char fw_file[64];
struct mutex sysfs_mutex;
@@ -752,12 +753,16 @@ static int raydium_i2c_fw_update(struct raydium_data *ts)
{
struct i2c_client *client = ts->client;
const struct firmware *fw = NULL;
- const char *fw_file = "raydium.fw";
int error;
- error = request_firmware(&fw, fw_file, &client->dev);
+ /* Firmware name */
+ snprintf(ts->fw_file, sizeof(ts->fw_file),
+ "raydium_%x.fw", ts->info.hw_ver);
+ dev_dbg(&client->dev, "firmware name: %s\n", ts->fw_file);
+
+ error = request_firmware(&fw, ts->fw_file, &client->dev);
if (error) {
- dev_err(&client->dev, "Unable to open firmware %s\n", fw_file);
+ dev_err(&client->dev, "Unable to open firmware %s\n", ts->fw_file);
return error;
}
--
2.12.2
next reply other threads:[~2017-12-21 13:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 13:51 jeffrey.lin [this message]
2018-01-05 5:53 ` [PATCH] driver: input :touchscreen :Modify Raydium Firmware update input file Dmitry Torokhov
2018-01-05 12:12 ` Jeffrey Lin (林義章)
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=20171221135122.345-1-jeffrey.lin@raydium.corp-partner.google.com \
--to=yajohn@gmail.com \
--cc=KP.li@rad-ic.com \
--cc=Katherine.Hsieh@quantatw.com \
--cc=albert.shieh@rad-ic.com \
--cc=bleung@google.com \
--cc=calvin.tseng@rad-ic.com \
--cc=dmitry.torokhov@gmail.com \
--cc=groeck@chromium.org \
--cc=jeffrey.lin@rad-ic.com \
--cc=keith.tzeng@quantatw.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox