phone-pad:android change code to rotate 270 degree,so change the x axis of touch...
authorzwp <zwp@rock-chips.com>
Sat, 20 Aug 2011 08:42:40 +0000 (01:42 -0700)
committer张文平 <zwp@rk29.(none)>
Tue, 23 Aug 2011 08:09:54 +0000 (16:09 +0800)
rule :x = max_x - x.

drivers/input/touchscreen/ft5x0x_i2c_ts.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 398ca3f..be04a5d
@@ -186,7 +186,7 @@ static void fts_ts_release(void)
 
                _st_finger_infos[i].u2_pressure = 0;
 
-               input_report_abs(data->input_dev, ABS_MT_POSITION_X, _st_finger_infos[i].i2_x);
+               input_report_abs(data->input_dev, ABS_MT_POSITION_X, SCREEN_MAX_X - _st_finger_infos[i].i2_x);
                input_report_abs(data->input_dev, ABS_MT_POSITION_Y, _st_finger_infos[i].i2_y);
                input_report_abs(data->input_dev, ABS_MT_TOUCH_MAJOR, _st_finger_infos[i].u2_pressure);
                input_report_abs(data->input_dev, ABS_MT_TRACKING_ID, _st_finger_infos[i].ui2_id);
@@ -439,7 +439,7 @@ int fts_read_data(void)
 
                                        input_report_abs(data->input_dev, ABS_MT_TRACKING_ID, _st_finger_infos[i].ui2_id);
                                        input_report_abs(data->input_dev, ABS_MT_TOUCH_MAJOR, _st_finger_infos[i].u2_pressure);
-                                       input_report_abs(data->input_dev, ABS_MT_POSITION_X,  _st_finger_infos[i].i2_x);
+                                       input_report_abs(data->input_dev, ABS_MT_POSITION_X,  SCREEN_MAX_X - _st_finger_infos[i].i2_x);
                                        input_report_abs(data->input_dev, ABS_MT_POSITION_Y,  _st_finger_infos[i].i2_y);
                                        input_mt_sync(data->input_dev);