aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c2440/mach-gta02.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-gta02.c')
-rw-r--r--arch/arm/mach-s3c2440/mach-gta02.c37
1 files changed, 27 insertions, 10 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 0ccb7fba850..6b44f1731b6 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -92,6 +92,9 @@
#include "../plat-s3c24xx/neo1973_pm_gps.h"
+#include <linux/ts_filter_mean.h>
+#include <linux/ts_filter_median.h>
+
/* arbitrates which sensor IRQ owns the shared SPI bus */
static spinlock_t motion_irq_lock;
@@ -939,20 +942,34 @@ static struct s3c2410_udc_mach_info gta02_udc_cfg = {
};
+
+/* touchscreen configuration */
+
+static struct ts_filter_median_configuration gta02_ts_median_config = {
+ .extent = 31,
+ .decimation_below = 28,
+ .decimation_threshold = 8 * 3,
+ .decimation_above = 12,
+};
+
+static struct ts_filter_mean_configuration gta02_ts_mean_config = {
+ .bits_filter_length = 3,
+ .averaging_threshold = 6 * 3,
+};
+
static struct s3c2410_ts_mach_info gta02_ts_cfg = {
.delay = 10000,
- .presc = 50000000 / 1000000, /* 50 MHz PCLK / 1MHz */
- /* simple averaging, 2^n samples */
- .oversampling_shift = 5,
- /* averaging filter length, 2^n */
- .excursion_filter_len_bits = 5,
- /* flagged for beauty contest on next sample if differs from
- * average more than this
- */
- .reject_threshold_vs_avg = 2,
+ .presc = 0xff, /* slow as we can go */
+ .filter_sequence = {
+ [0] = &ts_filter_median_api,
+ [1] = &ts_filter_mean_api,
+ },
+ .filter_config = {
+ [0] = &gta02_ts_median_config,
+ [1] = &gta02_ts_mean_config,
+ },
};
-
/* SPI: LCM control interface attached to Glamo3362 */
static void gta02_jbt6k74_reset(int devidx, int level)