* [patch] Input: edt-ft5x06 - fix an i2c write for M09 support
@ 2014-06-07 23:53 Simon Budig
2014-06-08 5:36 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Simon Budig @ 2014-06-07 23:53 UTC (permalink / raw)
To: Dmitry Torokhov, Lothar Waßmann
Cc: Henrik Rydberg, Grant Likely, Rob Herring, Fugang Duan,
Jingoo Han, linux-input, kernel-janitors, Robert Wörle
[-- Attachment #1.1: Type: text/plain, Size: 1016 bytes --]
Hi all.
I received notice from Robert Wörle who spotted a bug in the ft5x06
driver (M09 support) which can result in bogus values being written into
the configuration registers.
Paul wrote:
> I think i found the problem, as the driver sends 3 bytes instead of 2
> when accessing a register on the M09 firmware.
> Therefore , writing to gain seems to overflow into the offset register.
>
> This seems to be even in the lastet upstream driver so i created a patch
> for this driver which you find attached.
>
> @Simon Budig
>
> Find attached a patch to fix this edt driver bug, feel free to comment ,
> test and commit upstream ;-)
He is right, his fix is correct. Please include his patch into the
repository.
Acked-By: Simon Budig <simon.budig@kernelconcepts.de>
Thanks,
Simon
--
Simon Budig kernel concepts GmbH
simon.budig@kernelconcepts.de Sieghuetter Hauptweg 48
+49-271-771091-17 D-57072 Siegen
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Input-edt-ft5x06-fix-i2c-writes-to-2-bytes-on-M09-fi.patch --]
[-- Type: text/x-patch; name="0001-Input-edt-ft5x06-fix-i2c-writes-to-2-bytes-on-M09-fi.patch", Size: 929 bytes --]
From 36b9ac0e8206efefc8795c925b0f3b63ab29fd08 Mon Sep 17 00:00:00 2001
From: Robert Woerle <robert@linuxdevelopment.de>
Date: Wed, 28 May 2014 13:22:09 +0200
Subject: [PATCH] Input: edt-ft5x06 - fix i2c writes to 2 bytes on M09
firmware
Signed-off-by: Robert Woerle <robert@linuxdevelopment.de>
---
drivers/input/touchscreen/edt-ft5x06.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index f8815be..d4f3399 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -271,7 +271,7 @@ static int edt_ft5x06_register_write(struct edt_ft5x06_ts_data *tsdata,
wrbuf[0] = addr;
wrbuf[1] = value;
- return edt_ft5x06_ts_readwrite(tsdata->client, 3,
+ return edt_ft5x06_ts_readwrite(tsdata->client, 2,
wrbuf, 0, NULL);
default:
--
1.7.9.5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] Input: edt-ft5x06 - fix an i2c write for M09 support
2014-06-07 23:53 [patch] Input: edt-ft5x06 - fix an i2c write for M09 support Simon Budig
@ 2014-06-08 5:36 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2014-06-08 5:36 UTC (permalink / raw)
To: Simon Budig
Cc: Lothar Waßmann, Henrik Rydberg, Grant Likely, Rob Herring,
Fugang Duan, Jingoo Han, linux-input, kernel-janitors,
Robert Wörle
On Sun, Jun 08, 2014 at 01:53:48AM +0200, Simon Budig wrote:
> Hi all.
>
> I received notice from Robert Wörle who spotted a bug in the ft5x06
> driver (M09 support) which can result in bogus values being written into
> the configuration registers.
>
> Paul wrote:
> > I think i found the problem, as the driver sends 3 bytes instead of 2
> > when accessing a register on the M09 firmware.
> > Therefore , writing to gain seems to overflow into the offset register.
> >
> > This seems to be even in the lastet upstream driver so i created a patch
> > for this driver which you find attached.
> >
> > @Simon Budig
> >
> > Find attached a patch to fix this edt driver bug, feel free to comment ,
> > test and commit upstream ;-)
>
> He is right, his fix is correct. Please include his patch into the
> repository.
>
> Acked-By: Simon Budig <simon.budig@kernelconcepts.de>
Applied, thank you.
>
> Thanks,
> Simon
> --
> Simon Budig kernel concepts GmbH
> simon.budig@kernelconcepts.de Sieghuetter Hauptweg 48
> +49-271-771091-17 D-57072 Siegen
>
> From 36b9ac0e8206efefc8795c925b0f3b63ab29fd08 Mon Sep 17 00:00:00 2001
> From: Robert Woerle <robert@linuxdevelopment.de>
> Date: Wed, 28 May 2014 13:22:09 +0200
> Subject: [PATCH] Input: edt-ft5x06 - fix i2c writes to 2 bytes on M09
> firmware
>
> Signed-off-by: Robert Woerle <robert@linuxdevelopment.de>
> ---
> drivers/input/touchscreen/edt-ft5x06.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index f8815be..d4f3399 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -271,7 +271,7 @@ static int edt_ft5x06_register_write(struct edt_ft5x06_ts_data *tsdata,
> wrbuf[0] = addr;
> wrbuf[1] = value;
>
> - return edt_ft5x06_ts_readwrite(tsdata->client, 3,
> + return edt_ft5x06_ts_readwrite(tsdata->client, 2,
> wrbuf, 0, NULL);
>
> default:
> --
> 1.7.9.5
>
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-08 5:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-07 23:53 [patch] Input: edt-ft5x06 - fix an i2c write for M09 support Simon Budig
2014-06-08 5:36 ` Dmitry Torokhov
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).