aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/ts_filter.h7
-rw-r--r--include/linux/ts_filter_group.h39
-rw-r--r--include/linux/ts_filter_variance.h36
3 files changed, 41 insertions, 41 deletions
diff --git a/include/linux/ts_filter.h b/include/linux/ts_filter.h
index 7262bbaf3dd..bfb8a221964 100644
--- a/include/linux/ts_filter.h
+++ b/include/linux/ts_filter.h
@@ -4,14 +4,11 @@
/*
* touchscreen filter
*
- * median
- *
* (c) 2008 Andy Green <andy@openmoko.com>
*/
-/* max filters you can chain up */
-#define MAX_TS_FILTER_CHAIN 4
-#define MAX_TS_FILTER_COORDS 6
+#define MAX_TS_FILTER_CHAIN 4 /* max filters you can chain up */
+#define MAX_TS_FILTER_COORDS 3 /* Y, Y and Z (pressure) */
struct ts_filter;
diff --git a/include/linux/ts_filter_group.h b/include/linux/ts_filter_group.h
new file mode 100644
index 00000000000..1e74c8dc741
--- /dev/null
+++ b/include/linux/ts_filter_group.h
@@ -0,0 +1,39 @@
+#ifndef __TS_FILTER_GROUP_H__
+#define __TS_FILTER_GROUP_H__
+
+#include <linux/ts_filter.h>
+
+/*
+ * Touchscreen group filter.
+ *
+ * Copyright (C) 2008 by Openmoko, Inc.
+ * Author: Nelson Castillo <arhuaco@freaks-unidos.net>
+ *
+ */
+
+struct ts_filter_group_configuration {
+ int extent;
+ int close_enough;
+ int threshold;
+ int attempts;
+};
+
+struct ts_filter_group {
+ struct ts_filter tsf;
+ struct ts_filter_group_configuration *config;
+
+ int N; /* How many samples we have */
+ int *samples[MAX_TS_FILTER_COORDS]; /* the samples, our input */
+
+ int *group_size; /* used for temporal computations */
+ int *sorted_samples; /* used for temporal computations */
+
+ int range_max[MAX_TS_FILTER_COORDS]; /* max computed ranges */
+ int range_min[MAX_TS_FILTER_COORDS]; /* min computed ranges */
+
+ int tries_left; /* We finish if we don't get enough samples */
+};
+
+extern struct ts_filter_api ts_filter_group_api;
+
+#endif
diff --git a/include/linux/ts_filter_variance.h b/include/linux/ts_filter_variance.h
deleted file mode 100644
index 574cf90f3f5..00000000000
--- a/include/linux/ts_filter_variance.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef __TS_FILTER_VARIANCE_H__
-#define __TS_FILTER_VARIANCE_H__
-
-#include <linux/ts_filter.h>
-
-/*
- * touchscreen filter
- *
- * Variance
- *
- * Copyright (C) 2008 by Openmoko, Inc.
- * Author: Nelson Castillo <arhuaco@freaks-unidos.net>
- *
- */
-
-struct ts_filter_variance_configuration {
- int extent;
- int window;
- int threshold;
- int attempts;
-};
-
-struct ts_filter_variance {
- struct ts_filter tsf;
- struct ts_filter_variance_configuration *config;
-
- int *samples[2];
- int N; /* How many samples we have */
-
- int tries_left; /* How many times we can try to get a point */
- int passed; /* Did the samples pass the test? */
-};
-
-extern struct ts_filter_api ts_filter_variance_api;
-
-#endif