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

Input: ads7846 - report 0 pressure value along with pen up event

X touchscreen drivers that don't interpret the designated pen up message
assume a pen up event from a pressure value 0. For these we generate a
pressure 0 message along with the pen up message.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Juha Yrjola <juha.yrjola@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Imre Deak and committed by
Dmitry Torokhov
ae82d5ab c9e617a5

+4 -2
+4 -2
drivers/input/touchscreen/ads7846.c
··· 375 375 if (Rt) { 376 376 input_report_abs(input_dev, ABS_X, x); 377 377 input_report_abs(input_dev, ABS_Y, y); 378 - input_report_abs(input_dev, ABS_PRESSURE, Rt); 379 378 sync = 1; 380 379 } 381 - if (sync) 380 + 381 + if (sync) { 382 + input_report_abs(input_dev, ABS_PRESSURE, Rt); 382 383 input_sync(input_dev); 384 + } 383 385 384 386 #ifdef VERBOSE 385 387 if (Rt || ts->pendown)