summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Jander <david@protonic.nl>2017-03-20 19:05:29 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-03-25 18:38:43 +0100
commitf5a28a7d4858f94a2d8b5271ffee607de30050e4 (patch)
tree2384d99ea5dfd78020a938f3188f6f53ba115575 /drivers
parentInput: synaptics - add support for Intertouch devices (diff)
downloadlinux-f5a28a7d4858f94a2d8b5271ffee607de30050e4.tar.xz
linux-f5a28a7d4858f94a2d8b5271ffee607de30050e4.zip
Input: ads7846 - avoid pen up/down when reading hwmon
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/ads7846.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index f5793e3d945f..735a0be1ad95 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -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);