diff mbox series

[v2,2/2] input: egalax_ts: correct the get_firmware_command

Message ID 1586522585-14296-2-git-send-email-haibo.chen@nxp.com (mailing list archive)
State Superseded
Headers show
Series [v2,1/2] input: egalax_ts: free irq resource before request the line as GPIO | expand

Commit Message

Bough Chen April 10, 2020, 12:43 p.m. UTC
From: Haibo Chen <haibo.chen@nxp.com>

According to the User Guide, the get firmware command is
{ 0x03, 0x03, 0xa, 0x01, 'D' }, ASCII value of 'D' is 0x44.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 drivers/input/touchscreen/egalax_ts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Fabio Estevam April 10, 2020, 1:01 p.m. UTC | #1
Hi Haibo,

On Fri, Apr 10, 2020 at 9:51 AM <haibo.chen@nxp.com> wrote:
>
> From: Haibo Chen <haibo.chen@nxp.com>
>
> According to the User Guide, the get firmware command is
> { 0x03, 0x03, 0xa, 0x01, 'D' }, ASCII value of 'D' is 0x44.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
>  drivers/input/touchscreen/egalax_ts.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
> index c816e03ba421..bb0a59d19f34 100644
> --- a/drivers/input/touchscreen/egalax_ts.c
> +++ b/drivers/input/touchscreen/egalax_ts.c
> @@ -171,10 +171,10 @@ static int egalax_wake_up_device(struct i2c_client *client)
>
>  static int egalax_firmware_version(struct i2c_client *client)
>  {
> -       static const u8 cmd[MAX_I2C_DATA_LEN] = { 0x03, 0x03, 0xa, 0x01, 0x41 };
> +       static const u8 get_firmware_cmd[MAX_I2C_DATA_LEN] = { 0x03, 0x03, 0xa, 0x01, 0x44 };

The rename from 'cmd' to 'get_firmware_cmd' is an unrelated change.

The only change I would expect to see in this patch is 0x41 to 0x44.

Since this is bug fix, please add a Fixes tag.

Thanks
Bough Chen April 10, 2020, 1:18 p.m. UTC | #2
> -----Original Message-----
> From: Fabio Estevam <festevam@gmail.com>
> Sent: 2020年4月10日 21:01
> To: BOUGH CHEN <haibo.chen@nxp.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>;
> linux-input@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [PATCH v2 2/2] input: egalax_ts: correct the
> get_firmware_command
> 
> Hi Haibo,
> 
> On Fri, Apr 10, 2020 at 9:51 AM <haibo.chen@nxp.com> wrote:
> >
> > From: Haibo Chen <haibo.chen@nxp.com>
> >
> > According to the User Guide, the get firmware command is { 0x03, 0x03,
> > 0xa, 0x01, 'D' }, ASCII value of 'D' is 0x44.
> >
> > Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> > ---
> >  drivers/input/touchscreen/egalax_ts.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/input/touchscreen/egalax_ts.c
> > b/drivers/input/touchscreen/egalax_ts.c
> > index c816e03ba421..bb0a59d19f34 100644
> > --- a/drivers/input/touchscreen/egalax_ts.c
> > +++ b/drivers/input/touchscreen/egalax_ts.c
> > @@ -171,10 +171,10 @@ static int egalax_wake_up_device(struct
> > i2c_client *client)
> >
> >  static int egalax_firmware_version(struct i2c_client *client)  {
> > -       static const u8 cmd[MAX_I2C_DATA_LEN] = { 0x03, 0x03, 0xa, 0x01,
> 0x41 };
> > +       static const u8 get_firmware_cmd[MAX_I2C_DATA_LEN] = { 0x03,
> > + 0x03, 0xa, 0x01, 0x44 };
> 
> The rename from 'cmd' to 'get_firmware_cmd' is an unrelated change.
> 
> The only change I would expect to see in this patch is 0x41 to 0x44.
> 
> Since this is bug fix, please add a Fixes tag.

Okay, Thanks for your review!

Best Regards
Haibo Chen

> 
> Thanks
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
index c816e03ba421..bb0a59d19f34 100644
--- a/drivers/input/touchscreen/egalax_ts.c
+++ b/drivers/input/touchscreen/egalax_ts.c
@@ -171,10 +171,10 @@  static int egalax_wake_up_device(struct i2c_client *client)
 
 static int egalax_firmware_version(struct i2c_client *client)
 {
-	static const u8 cmd[MAX_I2C_DATA_LEN] = { 0x03, 0x03, 0xa, 0x01, 0x41 };
+	static const u8 get_firmware_cmd[MAX_I2C_DATA_LEN] = { 0x03, 0x03, 0xa, 0x01, 0x44 };
 	int ret;
 
-	ret = i2c_master_send(client, cmd, MAX_I2C_DATA_LEN);
+	ret = i2c_master_send(client, get_firmware_cmd, MAX_I2C_DATA_LEN);
 	if (ret < 0)
 		return ret;