aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c2440
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 /arch/arm/mach-s3c2440
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 'arch/arm/mach-s3c2440')
-rw-r--r--arch/arm/mach-s3c2440/mach-gta02.c18
1 files changed, 14 insertions, 4 deletions
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 <linux/ts_filter_mean.h>
#include <linux/ts_filter_median.h>
+#include <linux/ts_filter_variance.h>
/* 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] = &gta02_ts_median_config,
- [1] = &gta02_ts_mean_config,
+ [0] = &gta02_ts_variance_config,
+ [1] = &gta02_ts_median_config,
+ [2] = &gta02_ts_mean_config,
},
};