Forráskód Böngészése

Input: ads7846 - fix pressure reporting

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>
Pavel Machek 15 éve
szülő
commit
30ad7ba0a5
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      drivers/input/touchscreen/ads7846.c

+ 1 - 1
drivers/input/touchscreen/ads7846.c

@@ -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