Commit 0c2a68cf4d69c52926e2627c3191f9803f7f7105

Authored by Franklin S. Cooper Jr
Committed by Jacob Stiffler
1 parent e4daa9efa2

Revert "input: ti_am335x_tsc: Ignore previous pen down event when pen up event occurs"

This reverts commit e655e2f723a4e78a47868f766e4c141deca5e234.

This patch is no longer necessary due to backported patches from mainline
providing a better solution that solves this issue.

Also reverting this helps keep the driver in sync with mainline for future
patches.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>

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

drivers/input/touchscreen/ti_am335x_tsc.c
... ... @@ -53,8 +53,6 @@
53 53 u32 inp_xp, inp_xn, inp_yp, inp_yn;
54 54 u32 step_mask;
55 55 u32 charge_delay;
56   - u32 prev_x, prev_y, prev_z;
57   - bool event_pending;
58 56 };
59 57  
60 58 static unsigned int titsc_readl(struct titsc *ts, unsigned int reg)
... ... @@ -278,14 +276,6 @@
278 276 input_report_abs(input_dev, ABS_PRESSURE, 0);
279 277 input_sync(input_dev);
280 278 irqclr |= IRQENB_PENUP;
281   - ts_dev->event_pending = false;
282   - } else if (ts_dev->event_pending == true) {
283   - input_report_abs(input_dev, ABS_X, ts_dev->prev_x);
284   - input_report_abs(input_dev, ABS_Y, ts_dev->prev_y);
285   - input_report_abs(input_dev, ABS_PRESSURE, ts_dev->prev_z);
286   - input_report_key(input_dev, BTN_TOUCH, 1);
287   - input_sync(input_dev);
288   - ts_dev->event_pending = false;
289 279 }
290 280  
291 281 if (status & IRQENB_EOS)
... ... @@ -312,10 +302,11 @@
312 302 z = (z + 2047) >> 12;
313 303  
314 304 if (z <= MAX_12BIT) {
315   - ts_dev->prev_x = x;
316   - ts_dev->prev_y = y;
317   - ts_dev->prev_z = z;
318   - ts_dev->event_pending = true;
  305 + input_report_abs(input_dev, ABS_X, x);
  306 + input_report_abs(input_dev, ABS_Y, y);
  307 + input_report_abs(input_dev, ABS_PRESSURE, z);
  308 + input_report_key(input_dev, BTN_TOUCH, 1);
  309 + input_sync(input_dev);
319 310 }
320 311 }
321 312 irqclr |= IRQENB_FIFO0THRES;
... ... @@ -405,7 +396,6 @@
405 396 ts_dev->mfd_tscadc = tscadc_dev;
406 397 ts_dev->input = input_dev;
407 398 ts_dev->irq = tscadc_dev->irq;
408   - ts_dev->event_pending = false;
409 399  
410 400 err = titsc_parse_dt(pdev, ts_dev);
411 401 if (err) {
... ... @@ -482,7 +472,6 @@
482 472 struct ti_tscadc_dev *tscadc_dev;
483 473 unsigned int idle;
484 474  
485   - ts_dev->event_pending = false;
486 475 tscadc_dev = ti_tscadc_dev_get(to_platform_device(dev));
487 476 if (device_may_wakeup(tscadc_dev->dev)) {
488 477 idle = titsc_readl(ts_dev, REG_IRQENABLE);