Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Jander and committed by
Dmitry Torokhov
f5a28a7d e839ffab

+1 -1
+1 -1
drivers/input/touchscreen/ads7846.c
··· 871 871 msecs_to_jiffies(TS_POLL_PERIOD)); 872 872 } 873 873 874 - if (ts->pendown) { 874 + if (ts->pendown && !ts->stopped) { 875 875 struct input_dev *input = ts->input; 876 876 877 877 input_report_key(input, BTN_TOUCH, 0);