diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index 5345b4d..40f1fad 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -53,8 +53,6 @@ struct titsc { u32 inp_xp, inp_xn, inp_yp, inp_yn; u32 step_mask; u32 charge_delay; - u32 prev_x, prev_y, prev_z; - bool event_pending; }; static unsigned int titsc_readl(struct titsc *ts, unsigned int reg) @@ -278,14 +276,6 @@ static irqreturn_t titsc_irq(int irq, void *dev) input_report_abs(input_dev, ABS_PRESSURE, 0); input_sync(input_dev); irqclr |= IRQENB_PENUP; - ts_dev->event_pending = false; - } else if (ts_dev->event_pending == true) { - input_report_abs(input_dev, ABS_X, ts_dev->prev_x); - input_report_abs(input_dev, ABS_Y, ts_dev->prev_y); - input_report_abs(input_dev, ABS_PRESSURE, ts_dev->prev_z); - input_report_key(input_dev, BTN_TOUCH, 1); - input_sync(input_dev); - ts_dev->event_pending = false; } if (status & IRQENB_EOS) @@ -312,10 +302,11 @@ static irqreturn_t titsc_irq(int irq, void *dev) z = (z + 2047) >> 12; if (z <= MAX_12BIT) { - ts_dev->prev_x = x; - ts_dev->prev_y = y; - ts_dev->prev_z = z; - ts_dev->event_pending = true; + input_report_abs(input_dev, ABS_X, x); + input_report_abs(input_dev, ABS_Y, y); + input_report_abs(input_dev, ABS_PRESSURE, z); + input_report_key(input_dev, BTN_TOUCH, 1); + input_sync(input_dev); } } irqclr |= IRQENB_FIFO0THRES; @@ -405,7 +396,6 @@ static int titsc_probe(struct platform_device *pdev) ts_dev->mfd_tscadc = tscadc_dev; ts_dev->input = input_dev; ts_dev->irq = tscadc_dev->irq; - ts_dev->event_pending = false; err = titsc_parse_dt(pdev, ts_dev); if (err) { @@ -482,7 +472,6 @@ static int titsc_suspend(struct device *dev) struct ti_tscadc_dev *tscadc_dev; unsigned int idle; - ts_dev->event_pending = false; tscadc_dev = ti_tscadc_dev_get(to_platform_device(dev)); if (device_may_wakeup(tscadc_dev->dev)) { idle = titsc_readl(ts_dev, REG_IRQENABLE);