驱动需要修改,补丁如下(-表示去掉,+表示增加):
diff --git a/kernel/drivers/input/touchscreen/gt9xx/gt9xx.c b/kernel/drivers/input/touchscreen/gt9xx/gt9xx.c
index b4a538f..0bc94e0 100644
--- a/kernel/drivers/input/touchscreen/gt9xx/gt9xx.c
+++ b/kernel/drivers/input/touchscreen/gt9xx/gt9xx.c
@@ -434,12 +434,9 @@ static void gtp_touch_down(struct goodix_ts_data* ts,s32 id,s32 x,s32 y,s32 w)
input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, w);
#else
input_report_key(ts->input_dev, BTN_TOUCH, 1);
- input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x);
- input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y);
- input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, w);
- input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, w);
- input_report_abs(ts->input_dev, ABS_MT_TRACKING_ID, id);
- input_mt_sync(ts->input_dev);
+ input_report_abs(ts->input_dev, ABS_X, x);
+ input_report_abs(ts->input_dev, ABS_Y, y);
+ input_sync(ts->input_dev);
#endif
GTP_DEBUG("ID:%d, X:%d, Y:%d, W:%d", id, x, y, w);
@@ -496,11 +493,8 @@ static void gtp_pen_init(struct goodix_ts_data *ts)
input_set_capability(ts->pen_dev, EV_KEY, BTN_STYLUS2);
#endif
- input_set_abs_params(ts->pen_dev, ABS_MT_POSITION_X, 0, ts->abs_x_max, 0, 0);
- input_set_abs_params(ts->pen_dev, ABS_MT_POSITION_Y, 0, ts->abs_y_max, 0, 0);
- input_set_abs_params(ts->pen_dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
- input_set_abs_params(ts->pen_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
- input_set_abs_params(ts->pen_dev, ABS_MT_TRACKING_ID, 0, 255, 0, 0);
+ input_set_abs_params(ts->pen_dev, ABS_X, 0, ts->abs_x_max, 0, 0);
+ input_set_abs_params(ts->pen_dev, ABS_Y, 0, ts->abs_y_max, 0, 0);
ts->pen_dev->name = "goodix-pen";
ts->pen_dev->id.bustype = BUS_I2C;
@@ -531,12 +525,9 @@ static void gtp_pen_down(s32 x, s32 y, s32 w, s32 id)
input_report_abs(ts->pen_dev, ABS_MT_TOUCH_MAJOR, w);
#else
input_report_key(ts->pen_dev, BTN_TOUCH, 1);
- input_report_abs(ts->pen_dev, ABS_MT_POSITION_X, x);
- input_report_abs(ts->pen_dev, ABS_MT_POSITION_Y, y);
- input_report_abs(ts->pen_dev, ABS_MT_PRESSURE, w);
- input_report_abs(ts->pen_dev, ABS_MT_TOUCH_MAJOR, w);
- input_report_abs(ts->pen_dev, ABS_MT_TRACKING_ID, id);
- input_mt_sync(ts->pen_dev);
+ input_report_abs(ts->pen_dev, ABS_X, x);
+ input_report_abs(ts->pen_dev, ABS_Y, y);
+ input_sync(ts->pen_dev);
|