lkml.org 
[lkml]   [2012]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 21/22 v4] Input: atmel_mxt_ts - send all MT-B slots in one input report
Date
Each interrupt contains information for all contacts with changing
properties. Process all of this information at once, and send it all in a
a single input report (ie input events ending in EV_SYN/SYN_REPORT).

This patch was tested using an MXT224E.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 460c10f..06f2b7a 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -540,9 +540,6 @@ static void mxt_input_touchevent(struct mxt_data *data,
input_report_abs(input_dev, ABS_MT_PRESSURE, pressure);
input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, area);
}
-
- input_mt_report_pointer_emulation(input_dev, false);
- input_sync(input_dev);
}

static irqreturn_t mxt_interrupt(int irq, void *dev_id)
@@ -554,6 +551,7 @@ static irqreturn_t mxt_interrupt(int irq, void *dev_id)
u8 reportid;
u8 max_reportid;
u8 min_reportid;
+ bool update_input = false;

do {
if (mxt_read_message(data, &message)) {
@@ -567,12 +565,19 @@ static irqreturn_t mxt_interrupt(int irq, void *dev_id)
min_reportid = data->T9_reportid_min;
id = reportid - min_reportid;

- if (reportid >= min_reportid && reportid <= max_reportid)
+ if (reportid >= min_reportid && reportid <= max_reportid) {
mxt_input_touchevent(data, &message, id);
- else
+ update_input = true;
+ } else {
mxt_dump_message(dev, &message);
+ }
} while (reportid != 0xff);

+ if (update_input) {
+ input_mt_report_pointer_emulation(data->input_dev, false);
+ input_sync(data->input_dev);
+ }
+
end:
return IRQ_HANDLED;
}
--
1.7.7.3


\
 
 \ /
  Last update: 2012-06-18 06:42    [W:0.199 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site