Input: ads7846 - debouncing and rudimentary sample filtering

Some touchscreens seem to oscillate heavily for a while after touching
the screen.  Implement support for sampling the screen until we get two
consecutive values that are close enough.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Imre Deak
2006-04-11 23:42:03 -04:00
committed by Dmitry Torokhov
parent 53a0ef89e9
commit 0b7018aae7
2 changed files with 133 additions and 50 deletions

View File

@@ -14,5 +14,8 @@ struct ads7846_platform_data {
u16 x_min, x_max;
u16 y_min, y_max;
u16 pressure_min, pressure_max;
u16 debounce_max; /* max number of readings per sample */
u16 debounce_tol; /* tolerance used for filtering */
};