]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Input: ads7846 - avoid pen up/down when reading hwmon
authorDavid Jander <david@protonic.nl>
Mon, 20 Mar 2017 18:05:29 +0000 (11:05 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 25 Mar 2017 17:38:43 +0000 (10:38 -0700)
Each time the HWMON devices are read (e.g. battery voltage) while the
touchscreen is held pressed, extra pen-up and pen-down events are
generated. This is fixed by avoiding the UP event when the touchscreen is
stopped.

Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/ads7846.c

index f5793e3d945f76d2b5e27e829c6441cf352e2b56..735a0be1ad9533f66954e402dcd88766d6322a1e 100644 (file)
@@ -871,7 +871,7 @@ static irqreturn_t ads7846_irq(int irq, void *handle)
                                   msecs_to_jiffies(TS_POLL_PERIOD));
        }
 
-       if (ts->pendown) {
+       if (ts->pendown && !ts->stopped) {
                struct input_dev *input = ts->input;
 
                input_report_key(input, BTN_TOUCH, 0);