mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Input: ads7846 - improve filtering for thumb press accuracy
Providing more accurate coordinates for thumb press requires additional steps in the filtering logic: - Ignore samples found invalid by the debouncing logic, or the ones that have out of bound pressure value. - Add a parameter to repeat debouncing, so that more then two consecutive good readings are required for a valid sample. Signed-off-by: Imre Deak <imre.deak@nokia.com> Acked-by: Juha Yrjola <juha.yrjola@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
ae82d5ab05
commit
d5b415c95f
2 changed files with 61 additions and 17 deletions
|
@ -15,9 +15,11 @@ struct ads7846_platform_data {
|
|||
u16 y_min, y_max;
|
||||
u16 pressure_min, pressure_max;
|
||||
|
||||
u16 debounce_max; /* max number of readings per sample */
|
||||
u16 debounce_max; /* max number of additional readings
|
||||
* per sample */
|
||||
u16 debounce_tol; /* tolerance used for filtering */
|
||||
|
||||
u16 debounce_rep; /* additional consecutive good readings
|
||||
* required after the first two */
|
||||
int (*get_pendown_state)(void);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue