S3C: Backported openmoko's touchscreen filters
[linux-2.6/mini2440.git] / drivers / input / touchscreen / ts_filter_median.h
blob8f25e27b2aabada60d1248c14b259d8a3f1a04e4
1 #ifndef __TS_FILTER_MEDIAN_H__
2 #define __TS_FILTER_MEDIAN_H__
4 #include "ts_filter.h"
6 /*
7 * Touchscreen filter.
9 * median
11 * (c) 2008 Andy Green <andy@openmoko.com>
14 struct ts_filter_median_configuration {
15 int extent;
16 int midpoint;
17 int decimation_threshold;
18 int decimation_above;
19 int decimation_below;
22 struct ts_filter_median {
23 struct ts_filter tsf;
24 struct ts_filter_median_configuration *config;
26 int decimation_count;
27 int last_issued[MAX_TS_FILTER_COORDS];
28 int valid; /* how many samples in the sort buffer are valid */
29 int *sort[MAX_TS_FILTER_COORDS]; /* samples taken for median */
30 int *fifo[MAX_TS_FILTER_COORDS]; /* samples taken for median */
31 int pos; /* where we are in the fifo sample memory */
34 extern struct ts_filter_api ts_filter_median_api;
36 #endif