summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorImre Deak <imre.deak@solidboot.com>2007-01-18 00:44:41 -0500
committerDmitry Torokhov <dtor@insightbb.com>2007-01-18 00:44:41 -0500
commitda970e69efb9fd0be0c23ace5bde42d4caf17b40 (patch)
tree8d415d9ccbf6bbdfa360146c539d8213c794a21f /include
parent78a56aab11234e53b7e94e5a255cc3d27ab0a62b (diff)
downloadblackbird-op-linux-da970e69efb9fd0be0c23ace5bde42d4caf17b40.tar.gz
blackbird-op-linux-da970e69efb9fd0be0c23ace5bde42d4caf17b40.zip
Input: ads7846 - pluggable filtering logic
Some LCDs like the LS041Y3 require a customized filtering logic for reliable readings, so make the filtering function replacable through platform specific hooks. Signed-off-by: Imre Deak <imre.deak@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include')
-rw-r--r--include/linux/spi/ads7846.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h
index adb3dafd33e9..1663f940ca11 100644
--- a/include/linux/spi/ads7846.h
+++ b/include/linux/spi/ads7846.h
@@ -5,6 +5,12 @@
*
* It's OK if the min/max values are zero.
*/
+enum ads7846_filter {
+ ADS7846_FILTER_OK,
+ ADS7846_FILTER_REPEAT,
+ ADS7846_FILTER_IGNORE,
+};
+
struct ads7846_platform_data {
u16 model; /* 7843, 7845, 7846. */
u16 vref_delay_usecs; /* 0 for external vref; etc */
@@ -21,5 +27,9 @@ struct ads7846_platform_data {
u16 debounce_rep; /* additional consecutive good readings
* required after the first two */
int (*get_pendown_state)(void);
+ int (*filter_init) (struct ads7846_platform_data *pdata,
+ void **filter_data);
+ int (*filter) (void *filter_data, int data_idx, int *val);
+ void (*filter_cleanup)(void *filter_data);
};
OpenPOWER on IntegriCloud