A22:deal with minimum and maximal value of touchscreen specially
authorroot <root@lw.(none)>
Sat, 16 Jul 2011 06:07:57 +0000 (14:07 +0800)
committerroot <root@lw.(none)>
Sat, 16 Jul 2011 06:07:57 +0000 (14:07 +0800)
arch/arm/mach-rk29/board-rk29-a22.c
drivers/input/touchscreen/ili2102_ts.c

index 7dbe471677a02a72da569fb7c531f3b29fca3609..19cb1b82fa1e18c6774b6310d19ae60424a5b960 100755 (executable)
@@ -477,9 +477,9 @@ static struct ili2102_platform_data ili2102_info = {
        .model                  = 2102,
        .swap_xy                = 0,
        .x_min                  = 0,
-       .x_max                  = 481,
+       .x_max                  = 480,
        .y_min                  = 0,
-       .y_max                  = 801,
+       .y_max                  = 800,
        .gpio_reset     = ili2102_GPIO_RESET,
        .gpio_reset_active_low = 1,
        .gpio_pendown           = ili2102_GPIO_INT,
index 8bcf073ecad93281f2da86aa2027c006c35b165a..dbd723b95d3f7624f96e62ef0232e694406e8a77 100755 (executable)
@@ -304,6 +304,17 @@ static int verify_coord(struct ili2102_ts_data *ts,unsigned int *x,unsigned int
        if((*y< ts->y_min) || (*y > ts->y_max))
                return -1;
 
+       /*android do not support min and max value*/
+       if(*x == ts->x_min)
+               *x = ts->x_min + 1;
+       if(*y == ts->y_min)
+               *y = ts->y_min + 1;
+       if(*x == ts->x_max)
+               *x = ts->x_max - 1;
+       if(*y == ts->y_max)
+               *y = ts->y_max - 1;
+       
+
        return 0;
 }
 static int ili2102_init_panel(struct ili2102_ts_data *ts)