Input: ads7846 - fix pressure reporting
authorPavel Machek <pavel@ucw.cz>
Mon, 23 Nov 2009 16:17:38 +0000 (08:17 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Nov 2009 16:49:58 +0000 (08:49 -0800)
On Zaurus, hx4700 and others pressure is reported inverted -- the lighter
the pressure, the bigger numerical value.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/ads7846.c

index 09c810999b924137576b8df59e10e5be8feb667b..033233d2b5ebe06d8b4716d4bb4637737577a3e1 100644 (file)
@@ -608,7 +608,7 @@ static void ads7846_rx(void *ads)
 
                input_report_abs(input, ABS_X, x);
                input_report_abs(input, ABS_Y, y);
-               input_report_abs(input, ABS_PRESSURE, Rt);
+               input_report_abs(input, ABS_PRESSURE, ts->pressure_max - Rt);
 
                input_sync(input);
 #ifdef VERBOSE