diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:11:06 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:11:06 +0000 |
commit | d082ca932a9d03105fe26881ee860e7ff7025a9d (patch) | |
tree | 04253fc0920a760167d873d1c850bdbe0863bbb2 /arch/arm/mach-s3c2410/mach-gta01.c | |
parent | 4c1c1b07611390857b93f515a284dae2de3115d7 (diff) |
test-touchscreen-median.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-gta01.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-gta01.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c index 47377bd3da0..e718a810f42 100644 --- a/arch/arm/mach-s3c2410/mach-gta01.c +++ b/arch/arm/mach-s3c2410/mach-gta01.c @@ -505,19 +505,35 @@ static struct s3c2410_udc_mach_info gta01_udc_cfg = { .vbus_draw = gta01_udc_vbus_draw, }; + +/* touchscreen configuration */ + +static struct ts_filter_median_configuration gta01_ts_median_config = { + .extent = 31, + .decimation_below = 24, + .decimation_threshold = 8 * 3, + .decimation_above = 12, +}; + +static struct ts_filter_mean_configuration gta01_ts_mean_config = { + .bits_filter_length = 5, + .averaging_threshold = 12 +}; + static struct s3c2410_ts_mach_info gta01_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] = >a01_ts_median_config, + [1] = >a01_ts_mean_config, + }, }; + /* SPI */ static void gta01_jbt6k74_reset(int devidx, int level) |