Skip to contentSkip to conversation

ads7846: report 0 pressure value along with pen up event

PATCH New Imre Deak 1 participant 1 message Mar 21, 2006

Subsystems (2)
lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH 1/1 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.

Makefile +0 -0
drivers/input/touchscreen/ads7846.c +4 -2
index 00003d1..2b9a521 100644
@@ -366,11 +366,13 @@ static void ads7846_rx(void *ads)
 	if (Rt) {
 		input_report_abs(input_dev, ABS_X, x);
 		input_report_abs(input_dev, ABS_Y, y);
-		input_report_abs(input_dev, ABS_PRESSURE, Rt);
 		sync = 1;
 	}
-	if (sync)
+
+	if (sync) {
+		input_report_abs(input_dev, ABS_PRESSURE, Rt);
 		input_sync(input_dev);
+	}
 
 #ifdef	VERBOSE
 	if (Rt || ts->pendown)