因为客户模具已经固定好了,屏和触摸颠倒180度,导致触摸方位不准,可以通过修改驱动校正,修改如下:
diff --git a/kernel/drivers/hid/hid-multitouch.c b/kernel/drivers/hid/hid-multitouch.c
--- a/kernel/drivers/hid/hid-multitouch.c
+++ b/kernel/drivers/hid/hid-multitouch.c
@@ -649,8 +649,8 @@ static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
int major = max(s->w, s->h) >> 1;
int minor = min(s->w, s->h) >> 1;
- input_event(input, EV_ABS, ABS_MT_POSITION_X, s->x);
- input_event(input, EV_ABS, ABS_MT_POSITION_Y, s->y);
+ input_event(input, EV_ABS, ABS_MT_POSITION_X, 2048-s->x);
+ input_event(input, EV_ABS, ABS_MT_POSITION_Y, 2048-s->y);
input_event(input, EV_ABS, ABS_MT_TOOL_X, s->cx);
input_event(input, EV_ABS, ABS_MT_TOOL_Y, s->cy);
input_event(input, EV_ABS, ABS_MT_DISTANCE,
【rk3288 7.1 usb触摸上下左右反】
推荐阅读
- 开发文档|【资源共享】RK3288 使用POWER键开机
- RK3288|RK3288下添加PCF8563 RTC支持
- Android 8.1拦截Activity
- rk3288 apk通过jni控制gpio,实现人体感应自动开关门禁