Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1241437

[RFC 1/4] Input: edt-ft5x06 - Use max support points to determine how much to read

From fcooper@ti.com
Newsgroups linux.kernel
Subject [RFC 1/4] Input: edt-ft5x06 - Use max support points to determine how much to read
Date 2015-10-07 14:30 +0200
Message-ID <qgW15-4HJ-41@gated-at.bofh.it> (permalink)
References <qgW13-4HJ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Franklin S Cooper Jr <fcooper@ti.com>

Calculate the amount of data that needs to be read for the specified max
number of support points. If the maximum number of support points changes
then the amount that is read from the touch screen controller should
reflect this.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
---
 drivers/input/touchscreen/edt-ft5x06.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 7239c31..1e0ed6e 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -178,14 +178,16 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
 		cmd = 0xf9; /* tell the controller to send touch data */
 		offset = 5; /* where the actual touch data starts */
 		tplen = 4;  /* data comes in so called frames */
-		datalen = 26; /* how much bytes to listen for */
+
+		/* how many bytes to listen for */
+		datalen = tplen * MAX_SUPPORT_POINTS + offset + 1;
 		break;
 
 	case M09:
 		cmd = 0x02;
 		offset = 1;
 		tplen = 6;
-		datalen = 29;
+		datalen = tplen * MAX_SUPPORT_POINTS - cmd + 1;
 		break;
 
 	default:
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[RFC 1/4] Input: edt-ft5x06 - Use max support points to determine how much to read fcooper@ti.com - 2015-10-07 14:30 +0200
  Re: [RFC 1/4] Input: edt-ft5x06 - Use max support points to  determine how much to read Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-10-15 01:40 +0200
    Re: [RFC 1/4] Input: edt-ft5x06 - Use max support points to determine  how much to read "Franklin S Cooper Jr." <fcooper@ti.com> - 2015-10-15 04:00 +0200
      Re: [RFC 1/4] Input: edt-ft5x06 - Use max support points to  determine how much to read Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-10-16 02:20 +0200
        Re: [RFC 1/4] Input: edt-ft5x06 - Use max support points to determine  how much to read Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-10-16 02:50 +0200
          Re: [RFC 1/4] Input: edt-ft5x06 - Use max support points to determine  how much to read "Franklin S Cooper Jr." <fcooper@ti.com> - 2015-10-16 03:00 +0200
            Re: [RFC 1/4] Input: edt-ft5x06 - Use max support points to determine how much to read Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-10-16 03:00 +0200
        Re: [RFC 1/4] Input: edt-ft5x06 - Use max support points to determine  how much to read "Franklin S Cooper Jr." <fcooper@ti.com> - 2015-10-16 02:50 +0200
          Re: [RFC 1/4] Input: edt-ft5x06 - Use max support points to determine  how much to read "Franklin S Cooper Jr." <fcooper@ti.com> - 2015-10-16 02:50 +0200

csiph-web