revert v86 sitronix_ts of commit cb6f8a8f312c9ee1420a1b1afeb4b550b958f1ac and Re...
authorwuhao <wuhao@wuhao@rock-chips.com>
Wed, 7 Nov 2012 09:05:33 +0000 (17:05 +0800)
committerwuhao <wuhao@wuhao@rock-chips.com>
Sat, 10 Nov 2012 04:14:37 +0000 (12:14 +0800)
arch/arm/mach-rk2928/board-rk2926-sdk.c
arch/arm/mach-rk2928/include/mach/board.h
drivers/input/touchscreen/sitronix_ts_a720.c

index 1ee12f2d20d88f67ed985caad228b898f960a6ee..04b777ffb3c8da4c3d8fc7d72c84fd8a0b2f2149 100755 (executable)
@@ -470,10 +470,20 @@ int ft5306_init_platform_hw(void)
         return 0;
 
 }
-
+#if defined(V86_VERSION_1_1)
+int  sitronix_direction_otation( int *x,int *y )
+{
+       *x = *x ;
+       *y = 480 - *y ;
+       return 1 ;      
+}
+#endif
 struct ft5x0x_platform_data sitronix_info = {
         .model = 5007,
         .init_platform_hw= ft5306_init_platform_hw,
+         #if defined(V86_VERSION_1_1)
+         .direction_otation = sitronix_direction_otation ,
+         #endif
 };
 #endif
 
index 6ab45c5ddb0e90862a87dc2c9139dca4f3b59b39..303eeb0f0b9e1aea60ca8b27a50d95bfcc66127a 100755 (executable)
@@ -73,6 +73,7 @@ struct ft5x0x_platform_data{
     int     (*ft5x0x_platform_sleep)(void);
     int     (*ft5x0x_platform_wakeup)(void);
     void    (*exit_platform_hw)(void);
+    int     (*direction_otation)(int *x ,int *y );
 };
 #endif
 
index a11912f4e25cfa791320ccc64afb42a3131fd496..5ed48608d74dc791accce1f3eafd657be994882c 100755 (executable)
@@ -754,6 +754,8 @@ static void sitronix_ts_work_func(struct work_struct *work)
        uint8_t PixelCount = 0;
        static uint8_t all_clear = 1;
 
+      struct ft5x0x_platform_data *pdata=ts->client->dev.platform_data;
+
        DbgMsg("%s\n",  __FUNCTION__);
        if(ts->suspend_state){
                goto exit_invalid_data;
@@ -824,12 +826,19 @@ static void sitronix_ts_work_func(struct work_struct *work)
                                input_mt_slot(ts->input_dev, i);
                                input_report_abs(ts->input_dev,  ABS_MT_TRACKING_ID, i);
                                input_report_abs(ts->input_dev,  ABS_MT_TOUCH_MAJOR, 200);
-                               input_report_abs(ts->input_dev,  ABS_MT_POSITION_X, MTDStructure[i].Pixel_X);
-                               #if defined(CONFIG_MACH_RK2926_V86_VERSION_1_1)
-                               input_report_abs(ts->input_dev,  ABS_MT_POSITION_Y, 480 - MTDStructure[i].Pixel_Y);
-                               #else
-                               input_report_abs(ts->input_dev,  ABS_MT_POSITION_Y, MTDStructure[i].Pixel_Y);
-                                #endif
+                               
+                               if(pdata->direction_otation)
+                               {
+                                     int temp_x , temp_y ;
+                                     temp_x = MTDStructure[i].Pixel_X ;
+                                     temp_y = MTDStructure[i].Pixel_Y ;
+                                     pdata->direction_otation(&temp_x,&temp_y);
+                                input_report_abs(ts->input_dev,  ABS_MT_POSITION_X, temp_x);
+                                     input_report_abs(ts->input_dev,  ABS_MT_POSITION_Y, temp_y);
+                               }else{
+                                       input_report_abs(ts->input_dev,  ABS_MT_POSITION_X, MTDStructure[i].Pixel_X);
+                                       input_report_abs(ts->input_dev,  ABS_MT_POSITION_Y, MTDStructure[i].Pixel_Y);
+                               }
                                input_report_abs(ts->input_dev,  ABS_MT_WIDTH_MAJOR, 100);
                                DbgMsg("lr[%d](%d, %d)+\n", i, MTDStructure[i].Pixel_X, MTDStructure[i].Pixel_Y);
                        }else if(MTDStructure[i].Current_Pressed_area == AREA_NONE){