capacitive touch on A20

Started by pawnies20, December 10, 2015, 01:59:39 PM

Previous topic - Next topic

pawnies20

Hello everybody. First of all, I'm sorry for the long post, but I want this to become a resource for other beginners like me facing the same problem. I've been trying to get it right for 4 days now. There are many misleading or incomplete solutions out there.


I'm trying to have a FT5316 touch panel working with my olimex A10lime board. Here's my fex file:



[rtp_para]

rtp_used = 0

rtp_screen_size = 7

rtp_regidity_level = 7

rtp_press_threshold_enable = 0

rtp_press_threshold = 0x1f40

rtp_sensitive_level = 0xf

rtp_exchange_x_y_flag = 0




[ctp_para]

ctp_used = 1

ctp_name = "ft5x_ts"

ctp_twi_id = 0

ctp_twi_addr = 0x38

ctp_screen_max_x = 320

ctp_screen_max_y = 240

ctp_revert_x_flag = 0

ctp_revert_y_flag = 0

ctp_exchange_x_y_flag = 0

ctp_int_port = port:PI16<6><default><default><default>

ctp_wakeup = port:PI17<1><default><default><1>

ctp_io_port = port:PI16<0><default><default><default>


List of intterupt:
http://linux-sunxi.org/A10/PIO

i'm obtain this in dmesg:

[  200.225949] sunxi_gpio driver init ver 1.3
[  200.229725] IRQ handler type mismatch for IRQ 28
[  200.237285] current handler: ft5x_ts
[  200.248777] [<c0014c38>] (unwind_backtrace+0x0/0x134) from [<c0080bd0>] (__setup_irq+0x3e0/0x438)
[  200.256834] [<c0080bd0>] (__setup_irq+0x3e0/0x438) from [<c0080d60>] (request_threaded_irq+0xb0/0x138)
[  200.266469] [<c0080d60>] (request_threaded_irq+0xb0/0x138) from [<bf13bd94>] (sunxi_gpio_probe+0x408/0x4b8 [gpio_sunxi])
[  200.276025] [<bf13bd94>] (sunxi_gpio_probe+0x408/0x4b8 [gpio_sunxi]) from [<c030f78c>] (driver_probe_device+0xb8/0x380)
[  200.284157] [<c030f78c>] (driver_probe_device+0xb8/0x380) from [<c030fb24>] (__driver_attach+0x8c/0x90)
[  200.291944] [<c030fb24>] (__driver_attach+0x8c/0x90) from [<c030dae0>] (bus_for_each_dev+0x60/0x94)
[  200.299729] [<c030dae0>] (bus_for_each_dev+0x60/0x94) from [<c030ed2c>] (bus_add_driver+0xd0/0x28c)
[  200.307507] [<c030ed2c>] (bus_add_driver+0xd0/0x28c) from [<c0310128>] (driver_register+0x78/0x13c)
[  200.315457] [<c0310128>] (driver_register+0x78/0x13c) from [<c0008660>] (do_one_initcall+0x11c/0x174)
[  200.323598] [<c0008660>] (do_one_initcall+0x11c/0x174) from [<c006f268>] (sys_init_module+0x888/0x1cf4)
[  200.331561] [<c006f268>] (sys_init_module+0x888/0x1cf4) from [<c000e9c0>] (ret_fast_syscall+0x0/0x30)
[  200.356869] Can't request irq 28
[  200.365687] gpio-sunxi: probe of gpio-sunxi failed with error -16


It seems to me that ft5x_ts and gpio-sunxi are competing for IRQ 28, not being able to share it.

Does anyone have an idea how to fix this? I assume it must be some setting in my FEX configuration, but I don't know which one it could be.

Thank you

dave-at-axon

Why do you have the same port this these 2 configurations?


ctp_int_port = port:PI16<6><default><default><default>
ctp_io_port = port:PI16<0><default><default><default>