aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authormerge <null@invalid>2008-12-04 21:30:41 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-12-04 21:30:41 +0000
commit1bfcb6881cb4ea120894ef4e032fa3ca7d311b35 (patch)
treef1baa757ac1c48529a2433a295a490ef383c82b5 /include/linux
parentf1e6e9204ab03f140abe71c701d79728ae9a0baf (diff)
MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-cleanup-add-internal-functions-1228426177
pending-tracking-hist top was MERGE-via-stable-tracking-cleanup-add-internal-functions-1228426177 / cf9f1f4a754f2db71f829a8b07ac455e053b3d1f ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-cleanup-add-internal-functions stable-tracking-hist top was cleanup-add-internal-functions / 251b632aa7be6c6307a6938a59793e205da5b326 ... parent commitmessage: From: Nelson Castillo <nelsoneci@gmail.com> Cleanup - Add internal functions for clearing filters This patch adds the following functions: * ts_filter_mean_clear_internal * ts_filter_median_clear_internal The idea: avoid calling the clean function of other filters when we initialize one. Also: * modify messages for consistency. * remove an unneeded else. Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ts_filter_variance.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/ts_filter_variance.h b/include/linux/ts_filter_variance.h
new file mode 100644
index 00000000000..574cf90f3f5
--- /dev/null
+++ b/include/linux/ts_filter_variance.h
@@ -0,0 +1,36 @@
+#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