[PATCH] Adapt last Touchscreen Changes from GTA02 to GTA01
Jose Luis Perez Diez
perezdiez at gmail.com
Sat Feb 21 11:38:37 CET 2009
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 at gmail.com>
---
arch/arm/mach-s3c2410/mach-gta01.c | 38 ++++++++++++++++++++++++++++++++---
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 6eb8eb3..d424211 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] = >a01_ts_median_config,
- [1] = >a01_ts_mean_config,
+ [0] = >a01_ts_group_config,
+ [1] = >a01_ts_median_config,
+ [2] = >a01_ts_mean_config,
+ [3] = >a01_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 */
More information about the openmoko-kernel
mailing list