1.修改屏幕驱动 从ft6236 (删掉,不要保留),改为下面的
路径:/home/wells/tina-v853-open/tina-v853-open/device/config/chips/v851s/configs/lizard/board.dts (注意路径,要设置为自己的实际路径)
ctp@38 {
compatible = "focaltech,fts";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <PH 13 IRQ_TYPE_LEVEL_LOW>;
focaltech,reset-gpio = <&pio PH 14 GPIO_ACTIVE_HIGH>;
focaltech,irq-gpio = <&pio PH 13 IRQ_TYPE_LEVEL_LOW>;
focaltech,max-touch-number = <2>;
focaltech,display-coords = <0 0 480 800>;
status = "okay";
};
2.修改config
路径:/home/wells/tina-v853-open/tina-v853-open/device/config/chips/v851s/configs/lizard/linux-4.9/
原来:

现在

更换驱动
3.关闭自定义电源功能使能
修改路径:/home/wells/tina-v853-open/tina-v853-open/drivers/input/touchscreen/focaltech_touch/focaltech_config.h
从1改为0

#define FTS_POWER_SOURCE_CUST_EN 0
用于防止睡眠后唤醒触摸失灵,没反应。(没试过)
到此触摸可以运行.
触摸还有一个小问题,就是点左边,变成点右边!
修改文件,调换x 和 y的坐标即可
文件路径:
/home/wells/tina-v853-open/tina-v853-open/kernel/linux-4.9/drivers/input/touchscreen/focaltech_touch/

然后搜索REPORT 找到event 上报
注意默认是适配竖屏的,所以X Y 是正确的,不是互换XY的位置就能解决触摸的问题。
正确的思路是保持Y不变。调整X的坐标。
解决办法:
只需要改一下两行代码就可以了
input_report_abs(data->input_dev, ABS_MT_POSITION_X, -(event->au16_x[i]-480));

- 本文转载自:https://bbs.aw-ol.com/topic/3397/
|