From 1bfcb6881cb4ea120894ef4e032fa3ca7d311b35 Mon Sep 17 00:00:00 2001 From: merge Date: Thu, 4 Dec 2008 21:30:41 +0000 Subject: 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 MERGE-via-stable-tracking-hist-cleanup-add-internal-functions stable-tracking-hist top was cleanup-add-internal-functions / 251b632aa7be6c6307a6938a59793e205da5b326 ... parent commitmessage: From: Nelson Castillo 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 --- include/linux/ts_filter_variance.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/linux/ts_filter_variance.h (limited to 'include/linux') 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 + +/* + * touchscreen filter + * + * Variance + * + * Copyright (C) 2008 by Openmoko, Inc. + * Author: Nelson Castillo + * + */ + +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 -- cgit v1.2.3