input: touchscreen: add touch screen of gslx680 for rk3399-firefly-edp
[firefly-linux-kernel-4.4.55.git] / drivers / input / touchscreen / sitronix_ts_a720.c
index f4e4a7a9f0c351b1141dd4083db1835a557a42e2..37b4ffea345299d56d43124eb386a2c9fc4b1702 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,8 +826,24 @@ 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);
-                               input_report_abs(ts->input_dev,  ABS_MT_POSITION_Y, MTDStructure[i].Pixel_Y);
+
+                               #ifdef CONFIG_RK_CONFIG
+                                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);
+                               #else
+                               if( pdata && (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);
+                               }
+                               #endif
                                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){
@@ -1255,7 +1273,7 @@ static struct file_operations nc_fops = {
 };
 #endif // SITRONIX_FW_UPGRADE_FEATURE
 
-static int __devinit sitronix_ts_init(void)
+static int __init sitronix_ts_init(void)
 {
 #ifdef SITRONIX_FW_UPGRADE_FEATURE
        int result;