From: zwp Date: Sat, 20 Aug 2011 08:42:40 +0000 (-0700) Subject: phone-pad:android change code to rotate 270 degree,so change the x axis of touch... X-Git-Tag: firefly_0821_release~9770^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7d8a6ef703b34066e8ac88084033aad777be18a7;p=firefly-linux-kernel-4.4.55.git phone-pad:android change code to rotate 270 degree,so change the x axis of touch screen, rule :x = max_x - x. --- diff --git a/drivers/input/touchscreen/ft5x0x_i2c_ts.c b/drivers/input/touchscreen/ft5x0x_i2c_ts.c old mode 100644 new mode 100755 index 398ca3f4f3e5..be04a5d0d104 --- a/drivers/input/touchscreen/ft5x0x_i2c_ts.c +++ b/drivers/input/touchscreen/ft5x0x_i2c_ts.c @@ -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);