The touchscreen code that does the running averaging to smooth things out 
causes some troubles on the GTA01.  Unanimously [1], GTA01 owners wish the 
attached patch to be applied to the stable kernel, so that using the 
touchscreen on the device no longer scribbles all over somebody else's memory.

I'm guessing the touch-screen has the same problem, and that the same values 
apply... please correct me if my assumptions are flawed!


[1] Survey size: 1, running average: 1, standard deviation: 0, mean: 1, median: 
1    :-)


commit 5f42e24d361cd83178fe8da9d68efbf41a011483
Author: Mike Westerhof <[EMAIL PROTECTED]>
Date:   Sat Jul 5 20:30:19 2008 -0500

    Add missing initialization for the touchscreen driver for the
    gta01 platform.
    
    Signed-off-by: Mike Westerhof <[EMAIL PROTECTED]>

diff --git a/arch/arm/mach-s3c2410/mach-gta01.c 
b/arch/arm/mach-s3c2410/mach-gta01.c
index a017328..9adcaa0 100644
--- a/arch/arm/mach-s3c2410/mach-gta01.c
+++ b/arch/arm/mach-s3c2410/mach-gta01.c
@@ -496,8 +496,15 @@ static struct s3c2410_udc_mach_info gta01_udc_cfg = {
 
 static struct s3c2410_ts_mach_info gta01_ts_cfg = {
        .delay = 10000,
-       .presc = 65,
+       .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,
 };
 
 /* SPI */

Reply via email to