aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c2410
diff options
context:
space:
mode:
authorJose Luis Perez Diez <perezdiez@gmail.com>2009-02-21 11:45:48 +0000
committerAndy Green <agreen@octopus.localdomain>2009-02-21 11:45:48 +0000
commit9284591d0948c775afc97207001761eea649318c (patch)
tree2dc78b64ad6272b9778d32f6d58b71d271050274 /arch/arm/mach-s3c2410
parenta218b8640bc3aaa4123f230d1549d53f6ab9a01f (diff)
Adapt last Touchscreen Changes from GTA02 to GTA01
Pardon me if I am too verbose but this is my first opportunity to send a patch. I was wishing to try andy-tracking kernels on GTA01 long ago but It was FOSDEM and recent threads on the lists asking for GTA01 that made me do it. When I participated on the thread http://n2.nabble.com/empiezo-a-amargarme-con-los-kernels-necesito-consejo-td2347206.html in the Spanish mailing list asking what kernel to use with which distribution, I responded that only FSO based supported 2.6.28 and upwards. I could not resist to brag that I tested 2.6.29 on GTA01 but only with kexec ( it is possible that my wording was more ambiguous on the thread). Nelson Asked if I had problems booting it with u-boot. I tried and was successful but this time I played a Little with the interface and vala term and noticed that the on screen keyboard was changing the key pressed. Using http://svn.openmoko.org/developers/tick/touchtest/touch_test.py shown that most of the Up and sometimes the previous Move to where landing on ([290..310],575). Revising the code shown that the some of the filters and the option to disable them were missing on mach-gta01.c. I have tested the kernel with the patch applied with the filters disabled and also with them enabled. When the filters are active I still receive some misplaced up events but much less (the raster terminal keyboard is usable). Signed-off-by:Jose Luis Perez Diez <perezdiez@gmail.com>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r--arch/arm/mach-s3c2410/mach-gta01.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c
index 6eb8eb3ac46..d424211b9d6 100644
--- a/arch/arm/mach-s3c2410/mach-gta01.c
+++ b/arch/arm/mach-s3c2410/mach-gta01.c
@@ -88,8 +88,13 @@
#include <linux/jbt6k74.h>
+#ifdef CONFIG_TOUCHSCREEN_FILTER
+#include <../drivers/input/touchscreen/ts_filter_linear.h>
#include <../drivers/input/touchscreen/ts_filter_mean.h>
#include <../drivers/input/touchscreen/ts_filter_median.h>
+#include <../drivers/input/touchscreen/ts_filter_group.h>
+#endif
+
static struct map_desc gta01_iodesc[] __initdata = {
{
@@ -698,6 +703,19 @@ static struct s3c2410_udc_mach_info gta01_udc_cfg = {
/* touchscreen configuration */
+#ifdef CONFIG_TOUCHSCREEN_FILTER
+static struct ts_filter_linear_configuration gta01_ts_linear_config = {
+ .constants = {1, 0, 0, 0, 1, 0, 1}, /* don't modify coords */
+ .coord0 = 0,
+ .coord1 = 1,
+};
+
+static struct ts_filter_group_configuration gta01_ts_group_config = {
+ .extent = 12,
+ .close_enough = 10,
+ .threshold = 6, /* at least half of the points in a group */
+ .attempts = 10,
+};
static struct ts_filter_median_configuration gta01_ts_median_config = {
.extent = 31,
@@ -715,14 +733,26 @@ static struct s3c2410_ts_mach_info gta01_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_group_api,
+ [1] = &ts_filter_median_api,
+ [2] = &ts_filter_mean_api,
+ [3] = &ts_filter_linear_api,
},
.filter_config = {
- [0] = &gta01_ts_median_config,
- [1] = &gta01_ts_mean_config,
+ [0] = &gta01_ts_group_config,
+ [1] = &gta01_ts_median_config,
+ [2] = &gta01_ts_mean_config,
+ [3] = &gta01_ts_linear_config,
},
};
+#else /* !CONFIG_TOUCHSCREEN_FILTER */
+static struct s3c2410_ts_mach_info gta01_ts_cfg = {
+ .delay = 10000,
+ .presc = 0xff, /* slow as we can go */
+ .filter_sequence = { NULL },
+ .filter_config = { NULL },
+};
+#endif
/* SPI */