Commit 64464ae8e1d64fc9f63d9686d5e40b56ffa77203

Authored by Daniel Kurtz
Committed by Henrik Rydberg
1 parent cb15911509

Input: atmel_mxt_ts - send all MT-B slots in one input report

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>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>

Showing 1 changed file with 10 additions and 5 deletions Side-by-side Diff

drivers/input/touchscreen/atmel_mxt_ts.c
... ... @@ -547,9 +547,6 @@
547 547 input_report_abs(input_dev, ABS_MT_PRESSURE, pressure);
548 548 input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, area);
549 549 }
550   -
551   - input_mt_report_pointer_emulation(input_dev, false);
552   - input_sync(input_dev);
553 550 }
554 551  
555 552 static bool mxt_is_T9_message(struct mxt_data *data, struct mxt_message *msg)
... ... @@ -565,6 +562,7 @@
565 562 struct device *dev = &data->client->dev;
566 563 int id;
567 564 u8 reportid;
  565 + bool update_input = false;
568 566  
569 567 do {
570 568 if (mxt_read_message(data, &message)) {
571 569  
572 570  
573 571  
... ... @@ -576,11 +574,18 @@
576 574  
577 575 id = reportid - data->T9_reportid_min;
578 576  
579   - if (mxt_is_T9_message(data, &message))
  577 + if (mxt_is_T9_message(data, &message)) {
580 578 mxt_input_touchevent(data, &message, id);
581   - else
  579 + update_input = true;
  580 + } else {
582 581 mxt_dump_message(dev, &message);
  582 + }
583 583 } while (reportid != 0xff);
  584 +
  585 + if (update_input) {
  586 + input_mt_report_pointer_emulation(data->input_dev, false);
  587 + input_sync(data->input_dev);
  588 + }
584 589  
585 590 end:
586 591 return IRQ_HANDLED;