From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sangwon Jee <jeesw@melfas.com>
Cc: linux-input@vger.kernel.org
Subject: Re: Input: melfas_mip4 - use product id for firmware name
Date: Wed, 26 Oct 2016 15:54:47 -0700 [thread overview]
Message-ID: <20161026225447.GC27930@dtor-ws> (raw)
In-Reply-To: <1477464684-5848-1-git-send-email-jeesw@melfas.com>
On Wed, Oct 26, 2016 at 03:51:24PM +0900, Sangwon Jee wrote:
> Use product id for firmware name to request compatible firmware.
>
> Signed-off-by: Sangwon Jee <jeesw@melfas.com>
Applied, thank you.
> ---
> drivers/input/touchscreen/melfas_mip4.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c
> index 8739cb7..0f2230a 100644
> --- a/drivers/input/touchscreen/melfas_mip4.c
> +++ b/drivers/input/touchscreen/melfas_mip4.c
> @@ -162,6 +162,7 @@ struct mip4_ts {
> char product_name[16];
> u16 product_id;
> char ic_name[4];
> + char fw_name[32];
>
> unsigned int max_x;
> unsigned int max_y;
> @@ -280,6 +281,11 @@ static int mip4_query_device(struct mip4_ts *ts)
> dev_dbg(&ts->client->dev, "product id: %04X\n", ts->product_id);
> }
>
> + /* Firmware name */
> + snprintf(ts->fw_name, sizeof(ts->fw_name),
> + "melfas_mip4_%04X.fw", ts->product_id);
> + dev_dbg(&ts->client->dev, "firmware name: %s\n", ts->fw_name);
> +
> /* IC name */
> cmd[0] = MIP4_R0_INFO;
> cmd[1] = MIP4_R1_INFO_IC_NAME;
> @@ -1285,11 +1291,11 @@ static ssize_t mip4_sysfs_fw_update(struct device *dev,
> const struct firmware *fw;
> int error;
>
> - error = request_firmware(&fw, MIP4_FW_NAME, dev);
> + error = request_firmware(&fw, ts->fw_name, dev);
> if (error) {
> dev_err(&ts->client->dev,
> "Failed to retrieve firmware %s: %d\n",
> - MIP4_FW_NAME, error);
> + ts->fw_name, error);
> return error;
> }
>
> @@ -1608,6 +1614,6 @@ static struct i2c_driver mip4_driver = {
> module_i2c_driver(mip4_driver);
>
> MODULE_DESCRIPTION("MELFAS MIP4 Touchscreen");
> -MODULE_VERSION("2016.10.20");
> +MODULE_VERSION("2016.10.24");
> MODULE_AUTHOR("Sangwon Jee <jeesw@melfas.com>");
> MODULE_LICENSE("GPL");
> --
> 1.9.1
>
--
Dmitry
prev parent reply other threads:[~2016-10-26 22:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 6:51 Input: melfas_mip4 - use product id for firmware name Sangwon Jee
2016-10-26 22:54 ` Dmitry Torokhov [this message]
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=20161026225447.GC27930@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=jeesw@melfas.com \
--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.