CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 10598|回复: 4

驱动电容触摸屏,初始化失败

[复制链接]
发表于 2013-11-13 16:28:52 | 显示全部楼层 |阅读模式
用的CB1板子,接9.7寸LCD和9.7寸电容屏,在Lubuntu系统下,LCD没问题了,触摸屏初始化失败,register chrdev failed。
具体打印信息见后面。

我对硬件驱动不太懂,琢磨挺长时间了,请大侠指点!

电容屏采用的是FT5406的IC,在fex文件中的配置如下:
[twi2_para]
twi2_used                = 1
twi2_scl                 = port<PB20<2><default><default><default>
twi2_sda                 = port<PB21<2><default><default><default>

[ctp_para]
ctp_used                 =1
ctp_name                 = "ft5x_ts"
ctp_twi_id               = 2
ctp_twi_addr             =0x38
ctp_screen_max_x         = 1024
ctp_screen_max_y         = 768
ctp_revert_x_flag        = 0
ctp_revert_y_flag        = 0
ctp_exchange_x_y_flag    = 0
ctp_int_port             = port<PH21<6><default><default><default>
ctp_wakeup               = port<PB13<1><default><default><default>


初始化过程打印信息:
[   11.744328] ===========================ft5x_ts_init=====================
[   11.775276] ctp_fetch_sysconfig_para.
[   11.788402] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38. dirty_addr_buf[1]: 0xfffe
[   11.808737] ctp_fetch_sysconfig_para: ctp_twi_id is 2.
[   11.818502] ctp_fetch_sysconfig_para: screen_max_x = 1024.
[   11.828554] ctp_fetch_sysconfig_para: screen_max_y = 768.
[   11.838403] ctp_fetch_sysconfig_para: revert_x_flag = 0.
[   11.848162] ctp_fetch_sysconfig_para: revert_y_flag = 0.
[   11.858273] ctp_fetch_sysconfig_para: exchange_x_y_flag = 0.
[   11.871678] ft5x_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x38. normal_i2c[1]: 0xfffe
[   11.885615] ctp_init_platform_resource: tp_reset request gpio fail!
[   11.908048] ctp_init_platform_resource: No power port feature present.
[   11.924059] ctp_wakeup.
[   12.012141] ctp_detect: Detected chip ft5x_ts at adapter 2, address 0x38
[   12.035807] ====ft5x_ts_probe begin=====.  
[   12.059524] input: ft5x_ts as /devices/platform/sunxi-i2c.2/i2c-2/2-0038/input/input5
[   12.083827] ctp_set_irq_mode: config gpio to int mode.
[   12.095003] ctp_set_irq_mode, 225: gpio_int_info, port = 8, port_num = 21.
[   12.103895]  INTERRUPT CONFIG
[   12.110449] IRQ handler type mismatch for IRQ 28
[   12.117841] current handler: sunxi-gpio
........
[   12.415451] ft5x_ts 2-0038: ft5x_ts_probe: request irq failed
[   12.424842] ------------[ cut here ]------------
[   12.434928] WARNING: at kernel/irq/manage.c:428 enable_irq+0x3c/0x74()
[   12.444314] Unbalanced enable for IRQ 28
[   12.450058] Modules linked in:
。。。。。。
[   12.761702] ---[ end trace 46b6758855862a08 ]---
[   12.769970] ------------[ cut here ]------------
[   12.780229] WARNING: at kernel/irq/manage.c:1196 __free_irq+0x98/0x1c4()
[   12.790049] Trying to free already-free IRQ 28
[   12.796313] Modules linked in:
......
[   13.122440] ---[ end trace 46b6758855862a09 ]---
[   13.129490] ==singlethread error =
[   13.137361] ft5x_ts: probe of 2-0038 failed with error -16
[   13.150365] sunxi-rtc sunxi-rtc: setting system clock to 2010-01-01 00:00:17 UTC (1262304017)
[   13.160866] ALSA device list:
[   13.166902]   #0: sunxi-CODEC  Audio Codec
[   13.173081]   #1: sunxi-sndhdmi
[   17.153374] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 284225
[   17.161794] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 284224
[   17.169667] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 284223
[   17.174662] EXT4-fs (mmcblk0p2): 3 orphan inodes deleted
[   17.184144] EXT4-fs (mmcblk0p2): recovery complete
[   17.935720] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[   17.949398] VFS: Mounted root (ext4 filesystem) on device 179:2.
[   17.959207] devtmpfs: mounted
[   17.965942] Freeing init memory: 172K
[   19.752612] udevd[164]: starting version 175
[   21.376643] ===========================ft5x_ts_init=====================
[   21.496236] ctp_fetch_sysconfig_para.
[   21.607299] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38. dirty_addr_buf[1]: 0xfffe
[   21.905652] ctp_fetch_sysconfig_para: ctp_twi_id is 2.
[   22.055776] ctp_fetch_sysconfig_para: screen_max_x = 1024.
[   22.144495] ctp_fetch_sysconfig_para: screen_max_y = 768.
[   22.218105] ctp_fetch_sysconfig_para: revert_x_flag = 0.
[   22.247594] ctp_fetch_sysconfig_para: revert_y_flag = 0.
[   22.262843] ctp_fetch_sysconfig_para: exchange_x_y_flag = 0.
[   22.277015] ft5x_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x38. normal_i2c[1]: 0xfffe
[   22.291022] ctp_init_platform_resource: tp_reset request gpio fail!
[   22.302829] ctp_init_platform_resource: No power port feature present.
[   22.310889] ctp_wakeup.
[   22.363540] <3>drivers/input/touchscreen/ft5x_ts.c:register chrdev failed
[   25.349423] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
回复

使用道具 举报

发表于 2013-11-13 16:49:04 | 显示全部楼层
这个。。。看不懂
帮顶!!!



回复 支持 反对

使用道具 举报

发表于 2013-11-13 18:39:53 | 显示全部楼层
本帖最后由 lknlfy 于 2013-11-13 19:04 编辑

中断有问题。。
回复 支持 反对

使用道具 举报

发表于 2013-12-31 07:51:07 | 显示全部楼层
lknlfy 发表于 2013-11-13 18:39
中断有问题。。

我想到了k60单片机。。
回复 支持 反对

使用道具 举报

发表于 2014-8-20 21:18:58 | 显示全部楼层
大哥 怎么解决的呢 ,我的ic  是 tf5316    也没驱动起  
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-11-23 16:39 , Processed in 0.022434 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部