aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ts_filter_median.h
diff options
context:
space:
mode:
authorNelson Castillo <arhuaco@freaks-unidos.net>2009-10-24 03:04:31 -0500
committerLars-Peter Clausen <lars@metafoo.de>2009-12-15 18:30:22 +0100
commit9c015a908586a923406b025f51c5dc3896e530a7 (patch)
treeaa96d1d9c01b835b6a144abe42270e32278a4812 /drivers/input/touchscreen/ts_filter_median.h
parentfb49c8b3238fec0f79535303e90e909ccc058059 (diff)
Add touchscreen filters
Add filter source code and add it to the defconfig. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Diffstat (limited to 'drivers/input/touchscreen/ts_filter_median.h')
-rw-r--r--drivers/input/touchscreen/ts_filter_median.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/ts_filter_median.h b/drivers/input/touchscreen/ts_filter_median.h
new file mode 100644
index 00000000000..b13f361bb6a
--- /dev/null
+++ b/drivers/input/touchscreen/ts_filter_median.h
@@ -0,0 +1,32 @@
+#ifndef __TS_FILTER_MEDIAN_H__
+#define __TS_FILTER_MEDIAN_H__
+
+#include "ts_filter.h"
+
+/*
+ * Touchscreen filter.
+ *
+ * median
+ *
+ * (c) 2008 Andy Green <andy@warmcat.com>
+ */
+
+struct ts_filter_median_configuration {
+ /* Size of the filter. */
+ int extent;
+ /* Precomputed midpoint. */
+ int midpoint;
+ /* A reference value for us to check if we are going fast or slow. */
+ int decimation_threshold;
+ /* How many points to replace if we're going fast. */
+ int decimation_above;
+ /* How many points to replace if we're going slow. */
+ int decimation_below;
+
+ /* Generic configuration. */
+ struct ts_filter_configuration config;
+};
+
+extern const struct ts_filter_api ts_filter_median_api;
+
+#endif