linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rostislav Lisovy <lisovy@gmail.com>
To: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "Simon Budig" <simon.budig@kernelconcepts.de>,
	"Daniel Wagener" <daniel.wagener@kernelconcepts.de>,
	"Lothar Waßmann" <LW@KARO-electronics.de>,
	lisovy@jablotron.cz
Subject: [PATCH 2/2] input: edt-ft5x06: Perform register read from the very beginning (reg 0x0)
Date: Tue, 21 Apr 2015 13:19:53 +0200	[thread overview]
Message-ID: <1429615193-16794-2-git-send-email-lisovy@jablotron.cz> (raw)
In-Reply-To: <1429615193-16794-1-git-send-email-lisovy@jablotron.cz>

When the touch controller detects a touch event, it raises
an interrupt. The driver then reads the touch controller
registers in its ISR. When register readout is started with the
register 0x02, some devices (tested with the register-compatible
FT5316) return 'garbage' (on single touch, "number of touchpoints"
is 5, all the other registers are either 0xFF, 0x0F or 0x00)
and since the device thinks the interrupt event was not handled
properly (by proper register read), the interrupt is being invoked
cca 60--70 times.

By starting the register read with the register 0x00 (X and Y
coordinated are at the offset 3), valid data are read and the
interrupt event is properly handled.

Signed-off-by: Rostislav Lisovy <lisovy@jablotron.cz>
---
 drivers/input/touchscreen/edt-ft5x06.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index c938d4b..72bd74c 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -187,10 +187,10 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
 		break;
 
 	case M09:
-		cmd = 0x02;
-		offset = 1;
+		cmd = 0x00;
+		offset = 3;
 		tplen = 6;
-		datalen = 29;
+		datalen = 31;
 		break;
 
 	default:
-- 
2.1.0


      reply	other threads:[~2015-04-21 11:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21 11:19 [PATCH 1/2] input: edt-ft5x06: Do not hardcode register numbers in code, use #define Rostislav Lisovy
2015-04-21 11:19 ` Rostislav Lisovy [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=1429615193-16794-2-git-send-email-lisovy@jablotron.cz \
    --to=lisovy@gmail.com \
    --cc=LW@KARO-electronics.de \
    --cc=daniel.wagener@kernelconcepts.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lisovy@jablotron.cz \
    --cc=simon.budig@kernelconcepts.de \
    /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;
as well as URLs for NNTP newsgroup(s).