From: Imre Deak Date: Mon, 15 May 2006 07:40:02 +0000 (-0700) Subject: [PATCH 5/6] ads7846: report 0 pressure value along with pen up event X-Git-Tag: v2.6.17-omap1~70 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ff1d03fe91b16df21ccc429d08ece9bf6484d3bf;p=linux-2.6-omap-h63xx.git [PATCH 5/6] 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 Acked-by: Juha Yrjola Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 349afc4f71c..dac69dc4d10 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -426,11 +426,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)