linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ads7846 touchscreen: fix pressure
@ 2009-10-06 19:54 Pavel Machek
  2009-10-08  5:09 ` Trilok Soni
  0 siblings, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2009-10-06 19:54 UTC (permalink / raw)
  To: dtor, dmitry.torokhov, linux-input; +Cc: kernel list, Andrew Morton


On Zaurus, pressure is reported inverted -- the lighter the pressure,
the bigger numerical value. This should fix it.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

--- linux-rc/drivers/input.ofic/touchscreen/ads7846.c	2009-10-06 13:49:56.000000000 +0200
+++ linux-rc/drivers/input/touchscreen/ads7846.c	2009-10-06 21:18:25.000000000 +0200
@@ -608,12 +609,12 @@
 
 		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
 		dev_dbg(&ts->spi->dev, "%4d/%4d/%4d\n", x, y, Rt);
 #endif
 	}
 
 	hrtimer_start(&ts->timer, ktime_set(0, TS_POLL_PERIOD),

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 10+ messages in thread
* ads7846 touchscreen: fix pressure
@ 2009-11-20 18:22 Pavel Machek
  2009-11-20 18:25 ` Dmitry Torokhov
  0 siblings, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2009-11-20 18:22 UTC (permalink / raw)
  To: dtor, dmitry.torokhov, linux-input; +Cc: kernel list, Andrew Morton


On Zaurus, pressure is reported inverted -- the lighter the pressure,
the bigger numerical value. This should fix it.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

--- linux-rc/drivers/input.ofic/touchscreen/ads7846.c	2009-10-06 13:49:56.000000000 +0200
+++ linux-rc/drivers/input/touchscreen/ads7846.c	2009-10-06 21:18:25.000000000 +0200
@@ -608,12 +609,12 @@
 
 		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
 		dev_dbg(&ts->spi->dev, "%4d/%4d/%4d\n", x, y, Rt);
 #endif
 	}
 
 	hrtimer_start(&ts->timer, ktime_set(0, TS_POLL_PERIOD),

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-11-26  2:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-06 19:54 ads7846 touchscreen: fix pressure Pavel Machek
2009-10-08  5:09 ` Trilok Soni
2009-10-08  9:24   ` Pavel Machek
2009-10-09 16:35     ` Dmitry Torokhov
2009-10-09 20:22       ` Pavel Machek
2009-10-13 13:29         ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2009-11-20 18:22 Pavel Machek
2009-11-20 18:25 ` Dmitry Torokhov
2009-11-20 18:50   ` Pavel Machek
2009-11-26  2:10     ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).