From 9e58a18567ec1ef306ea7b973749e5cd9902702c Mon Sep 17 00:00:00 2001 From: Nelson Castillo Date: Tue, 10 Mar 2009 12:04:16 +0000 Subject: Use non-void configurations This patch defines a ts_filter_configuration structure to avoid using void* in the filter initialization, fixing another upstream correction. This also makes the initialization more readable. Tested in GTA02/rev6. Other changes: ~ Comment filter configuration structures. ~ ts_filter.c:ts_filter_chain_create improved. ~ Small cleanups. ~ More TODOs/FIXMEs. ~ Updated GTA02 filter configuration. ~ Updated GTA01 filter configuration. ~ Updated mach-s3c2410/include/mach/ts.h for the new ts. configuration structure. ~ Updated all the filters to use the new configuration structure. ~ Removed MAX_TS_FILTER_CHAIN constant that is no longer needed. No more evil casts left it seems. Signed-off-by: Nelson Castillo --- drivers/input/touchscreen/ts_filter_group.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'drivers/input/touchscreen/ts_filter_group.h') diff --git a/drivers/input/touchscreen/ts_filter_group.h b/drivers/input/touchscreen/ts_filter_group.h index c13b0c487df..4fc2af70608 100644 --- a/drivers/input/touchscreen/ts_filter_group.h +++ b/drivers/input/touchscreen/ts_filter_group.h @@ -12,10 +12,23 @@ */ struct ts_filter_group_configuration { - int extent; + /* Size of the filter. */ + int length; + /* + * If two points are separated by this distance or less they + * are considered to be members of the same group. + */ int close_enough; + /* Minimum allowed size for the biggest group in the sample set. */ int threshold; + /* + * Number of times we try to get a group of points with at least + * threshold points. + */ int attempts; + + /* Generic filter configuration. */ + struct ts_filter_configuration config; }; extern struct ts_filter_api ts_filter_group_api; -- cgit v1.2.3