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 --- arch/arm/mach-s3c2440/mach-gta02.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-s3c2440') diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 0b9611f636f..02bd6c4fb9e 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c @@ -105,6 +105,7 @@ #include #include +#include /* arbitrates which sensor IRQ owns the shared SPI bus */ static spinlock_t motion_irq_lock; @@ -1015,6 +1016,13 @@ static struct s3c2410_udc_mach_info gta02_udc_cfg = { /* touchscreen configuration */ +static struct ts_filter_variance_configuration gta02_ts_variance_config = { + .extent = 20, + .window = 5, + .threshold = 10, /* variance = 10, std = 3.1623 */ + .attempts = 5, /* try 5 times before giving up */ +}; + static struct ts_filter_median_configuration gta02_ts_median_config = { .extent = 31, .decimation_below = 5, @@ -1031,12 +1039,14 @@ static struct s3c2410_ts_mach_info gta02_ts_cfg = { .delay = 10000, .presc = 0xff, /* slow as we can go */ .filter_sequence = { - [0] = &ts_filter_median_api, - [1] = &ts_filter_mean_api, + [0] = &ts_filter_variance_api, + [1] = &ts_filter_median_api, + [2] = &ts_filter_mean_api, }, .filter_config = { - [0] = >a02_ts_median_config, - [1] = >a02_ts_mean_config, + [0] = >a02_ts_variance_config, + [1] = >a02_ts_median_config, + [2] = >a02_ts_mean_config, }, }; -- cgit v1.2.3