From: Pavel Machek Date: Mon, 23 Nov 2009 16:17:38 +0000 (-0800) Subject: Input: ads7846 - fix pressure reporting X-Git-Tag: firefly_0821_release~9833^2~2172^2~129 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30ad7ba0a55ef394c6956c886ddd058173153506;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 09c810999b92..033233d2b5eb 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/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