/************************************************************************
* I.MX6 Goodix GT9xx touchscreen driver porting
* 声明:
* 本文主要是记录GT9xx电容Touch移植过程中遇到的一些问题。
*
* 2016-1-27 深圳 南山平山村 曾剑锋
***********************************************************************/ 一、参考文档:
GT9XX驱动移植说明书_for_Android_2014011401.pdf 二、error :
. 出错信息:
. 直接将驱动放在kernel里系统会卡死,出错信息如下:
USB Gadget resume begins
fsl_udc_resume, Wait for wakeup thread finishes
dr_controller_run: udc out low power mode
USB Gadget resume ends
fsl-usb2-udc: bind to driver android_usb
mousedev: PS/ mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
<<-GTP-INFO->> GTP driver installing...
<<-GTP-INFO->> GTP Driver Version: V2.<//>
<<-GTP-INFO->> GTP Driver Built@::, Jan
<<-GTP-INFO->> GTP I2C Address: 0x5d
<<-GTP-INFO->> Guitar reset
<<-GTP-INFO->> Chip Type: GOODIX_GT9
<<-GTP-INFO->> IC Version: 9157_1040
<<-GTP-INFO->> X_MAX: , Y_MAX: , TRIGGER: 0x01
<<-GTP-INFO->> create proc entry gt9xx_config success
input: goodix-ts as /devices/virtual/input/input1
<<-GTP-INFO->> GTP works in interrupt mode.
<<-GTP-INFO->> Applied memory size:.
<<-GTP-INFO->> Applied memory size:.
<<-GTP-INFO->> I2C function: without pre and end cmd!
<<-GTP-INFO->> Create proc entry success!
mtk_tpd: hotknot_device register failed
USB Gadget resume begins
fsl_udc_resume, Wait for wakeup thread finishes
ehci_fsl_bus_suspend begins, Host
ehci_fsl_bus_suspend ends, Host
<系统会卡死在这里,接下来没有任何信息输出>
. 作为模块加入内核,使用久了,系统也会卡死:
root@android:/ # cd /data/local
root@android:/data/local # ls
gt9xxm.ko
tmp
root@android:/data/local # insmod gt9xxm.ko
<<-GTP-INFO->> GTP driver installing...
<<-GTP-INFO->> GTP Driver Version: V2.<//>
<<-GTP-INFO->> GTP Driver Built@::, Jan
<<-GTP-INFO->> GTP I2C Address: 0x5d
<<-GTP-INFO->> Guitar reset
<<-GTP-INFO->> Chip Type: GOODIX_GT9
<<-GTP-INFO->> IC Version: 9157_1040
<<-GTP-INFO->> X_MAX: , Y_MAX: , TRIGGER: 0x01
<<-GTP-INFO->> create proc entry gt9xx_config success
input: goodix-ts as /devices/virtual/input/input1
cpufreq_interactive_input_connect: connect to goodix-ts
<<-GTP-INFO->> GTP works in interrupt mode.
<<-GTP-INFO->> Applied memory size:.
<<-GTP-INFO->> Applied memory size:.
<<-GTP-INFO->> I2C function: without pre and end cmd!
root@android:/data/local # <<-GTP-INFO->> Create proc entry success!
mtk_tpd: hotknot_device register failed
. 解决方法:
. cat gt9xx.h
......
#define HOTKNOT_ENABLE 0 // hotknot module
#define HOTKNOT_BLOCK_RW 0 // block rw operation in hotknot
......
. cat goodix_tool.c
s32 init_wr_node(struct i2c_client *client)
{
......
#if 0
if (misc_register(&hotknot_misc_device))
{
printk("mtk_tpd: hotknot_device register failed\n");
return FAIL;
}
#endif
......
}
. 思路来源:
. 想通过尽可能减少驱动的功能来判断驱动哪里出了问题。
. cat gt9xx.h
......
#define HOTKNOT_ENABLE 1 // hotknot module
#define HOTKNOT_BLOCK_RW 1 // block rw operation in hotknot
......
. 如上所述,不需要该功能,当然我也不知道这是什么功能。
. 改为如下内容:
#define HOTKNOT_ENABLE 0 // hotknot module
#define HOTKNOT_BLOCK_RW 0 // block rw operation in hotknot
. 报错如下:
......
CC drivers/input/touchscreen/gt9xx.o
drivers/input/touchscreen/gt9xx.c: In function 'goodix_ts_suspend':
drivers/input/touchscreen/gt9xx.c::: warning: unused variable 'buf' [-Wunused-variable]
CC drivers/input/touchscreen/gt9xx_update.o
CC drivers/input/touchscreen/goodix_tool.o
drivers/input/touchscreen/goodix_tool.c: In function 'init_wr_node':
drivers/input/touchscreen/goodix_tool.c::: error: 'hotknot_misc_device' undeclared (first use in this function)
drivers/input/touchscreen/goodix_tool.c::: note: each undeclared identifier is reported only once for each function it appears in
drivers/input/touchscreen/goodix_tool.c: At top level:
drivers/input/touchscreen/goodix_tool.c::: warning: 'hotknot_write' defined but not used [-Wunused-function]
drivers/input/touchscreen/goodix_tool.c::: warning: 'hotknot_read' defined but not used [-Wunused-function]
make[]: *** [drivers/input/touchscreen/goodix_tool.o] Error
make[]: *** [drivers/input/touchscreen] Error
make[]: *** [drivers/input] Error
make: *** [drivers] Error
error: make uImage failed.
./remake.sh: : exit: Illegal number: -
. 既然已经禁止了,那么不可能还有hotknot_misc_device设备注册的,也就意味着这个版本的驱动有错。
. 综上所述:可能是我们的kernel不支持hotknot这个功能导致的。 三、error :
. 触摸屏点击有效,但是不准确,TP厂没有给矫正文件,后来FAE确认是由于矫正配置参数的问题。
. 修改gt9xx.h文件:
......
#define GTP_DRIVER_SEND_CFG 1
......
. 配置参数:
#define CTP_CFG_GROUP0 {\
0x46,0xD0,0x02,0x00,0x05,0x0A,0x05,0x40,0x01,0x08,\
0x28,0x0F,0x50,0x32,0x03,0x05,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8A,0x0A,0x0B,\
0x2E,0x30,0x31,0x0D,0x00,0x00,0x00,0x02,0x03,0x1D,\
0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x32,0x00,0x00,\
0x00,0x21,0x41,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,\
0x9E,0x23,0x00,0x8D,0x28,0x00,0x80,0x2E,0x00,0x74,\
0x35,0x00,0x69,0x3C,0x00,0x69,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x16,0x14,0x12,0x10,0x0E,0x0C,0x0A,0x08,\
0x06,0x04,0x02,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x16,0x13,0x18,0x12,0x1C,0x10,0x1D,0x0F,\
0x0A,0x1E,0x00,0x24,0x22,0x02,0x21,0x04,0x20,0x06,\
0x1F,0x08,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,\
0x00,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,\
0x9F,0xFF,0xFF,0xFF,0x00,0x01\
}

I.MX6 Goodix GT9xx touchscreen driver porting的更多相关文章

  1. I.MX6 Linux eGTouch TouchScreen porting

    I.MX6 Linux eGTouch TouchScreen porting 一.Download Driver: http://www.eeti.com.tw/drivers_Linux.html ...

  2. I.MX6 bq27441 driver porting

    /************************************************************************** * I.MX6 bq27441 driver p ...

  3. I.MX6 PMU MMPF0100 driver porting

    /************************************************************************** * I.MX6 MMPF0100 driver ...

  4. I.MX6 ar1020 SPI device driver hacking

    /************************************************************************************ * I.MX6 ar1020 ...

  5. I.MX6 Android U-blox miniPCI 4G porting

    /************************************************************************** * I.MX6 Android U-blox m ...

  6. I.MX6 Linux I2C device& driver hacking

    /******************************************************************************************* * I.MX6 ...

  7. [RK3288][Android6.0] 调试笔记 --- Goodix GT9和GT9F区别【转】

    本文转载自:http://blog.csdn.net/kris_fei/article/details/78341425 Platform: RK3288 OS: Android 6.0 Kernel ...

  8. [RK3399] 汇顶gt9xx触摸屏在RK原始代码调试

    CPU:RK3399 系统:Android 7.1 触摸屏:1024x768   8inch 触摸IC:GT9271 基于RK3399,从瑞芯微服务器更新到最新的 Android 7.1 代码中,瑞芯 ...

  9. gt811 driver

    #include <linux/module.h> #include <linux/i2c.h> #include <linux/platform_device.h> ...

随机推荐

  1. ComboTree使用

      1.参考资料 1.http://www.jeasyui.com/documentation/combotree.php 2.http://blog.csdn.net/woshichunchun/a ...

  2. 20160722noip模拟赛alexandrali

    [题目大意] 有许多木块, 叠放时, 必须正着叠放, 如图1, 左边两块为合法叠放, 右边为不合法叠放. 图1 一个方块被称为稳定的, 当且仅当其放在最底层, 或其正下方有方块且下方的这个方块的四周都 ...

  3. ios开发之网络数据的下载与上传

    要实现网络数据的下载与上传,主要有三种方式 > NSURLConnection  针对少量数据,使用“GET”或“POST”方法从服务器获取数据,使用“POST”方法向服务器传输数据; > ...

  4. CDATA

    1DTD中的属性类型 全名:character data 在标记CDATA下,所有的标记.实体引用都被忽略,而被XML处理程序一视同仁地当做字符数据看待,CDATA的形式如下: <![CDATA ...

  5. linux vi修改后如何保存

    linux vi修改后如何保存 按ESC键去到命令模式,然后: :w?? 保存文件但不退出vi :w file 将修改另外保存到file中,不退出vi :w! 强制保存,不推出vi :wq 保存文件并 ...

  6. uva 11609

    可以想到 答案为 1*C(1,n)+2*C(2,n)+3*C(3,n)+....+n*C(n,n); 由公式 k*C(k,n) = n*C(k-1,n-1) 所以最终答案 n*2^(n-1) 用到快速 ...

  7. Unity3D之Vector3.Dot和Vector3.Cross的使用

    在unity3d中,Vector3.Dot表示求两个向量的点积;Vector3.Cross表示求两个向量的叉积. 点积计算的结果为数值,而叉积计算的结果为向量.两者要注意区别开来. 在几何数学中: 1 ...

  8. hdu 2112 HDU Today (最短路,字符处理)

    题目 题目很简单,只是多了对地名转化为数字的处理,好吧,这我也是参考网上的处理办法,不过大多数的人采用map来处理 注意初始化注意范围,不然会wa!!!(这是我当时wa的原因org) 大家容易忽视的地 ...

  9. Genymotion加载so出错解决方案

    通过网上所搜得出结论: Genymotion是x86的架构,而我们的so库是arm架构的 解决:安装Genymotion-ARM-Translation.zip 1.下载:http://pan.bai ...

  10. eclipse 或MyEclipse将工程进行移动的时候会对@Override报错的处理方法

    有时候导入javaSE,javaEE,android 工程的时候,明明是刚刚用过的没有问题的工程,但重新导入的时候就报错. 提示The method ... must override a sperc ...