Skip to content

Commit ae82d5a

Browse files
Imre DeakDmitry Torokhov
authored andcommitted
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>
1 parent c9e617a commit ae82d5a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/input/touchscreen/ads7846.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,13 @@ static void ads7846_rx(void *ads)
375375
if (Rt) {
376376
input_report_abs(input_dev, ABS_X, x);
377377
input_report_abs(input_dev, ABS_Y, y);
378-
input_report_abs(input_dev, ABS_PRESSURE, Rt);
379378
sync = 1;
380379
}
381-
if (sync)
380+
381+
if (sync) {
382+
input_report_abs(input_dev, ABS_PRESSURE, Rt);
382383
input_sync(input_dev);
384+
}
383385

384386
#ifdef VERBOSE
385387
if (Rt || ts->pendown)

0 commit comments

Comments
 (0)