[ctp_para]
ctp_used = 1
ctp_name = "ft5x_ts"
ctp_twi_id = 1
ctp_twi_addr = 0x38
ctp_screen_max_x = 1024
ctp_screen_max_y = 600
ctp_revert_x_flag = 0
ctp_revert_y_flag = 0
ctp_exchange_x_y_flag = 1
ctp_firm = 1
ctp_int_port = port:PH14<6><default><default><default>
ctp_wakeup = port:PG02<1><default><default><1>
ctp_io_port = port:PH14<0><default><default><default>
ctp_reset = port:PG02<1><default><default><default>
[ctp_list_para]
ctp_det_used = 1
ft5x_ts = 1
gt82x = 0
gslX680 = 0
gt9xx_ts = 0
gt811 = 0
[ 18.461470] ===========================ft5x_ts_init=====================
[ 18.464334] ctp_fetch_sysconfig_para.
[ 18.473753] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38. dirty_addr_buf[1]: 0xfffe
[ 18.482484] ctp_fetch_sysconfig_para: ctp_twi_id is 1.
[ 18.487225] ctp_fetch_sysconfig_para: screen_max_x = 1024.
[ 18.491732] ctp_fetch_sysconfig_para: screen_max_y = 600.
[ 18.496193] ctp_fetch_sysconfig_para: revert_x_flag = 0.
[ 18.500566] ctp_fetch_sysconfig_para: revert_y_flag = 0.
[ 18.505335] ctp_fetch_sysconfig_para: exchange_x_y_flag = 1.
[ 18.513002] ft5x_ts_init: after fetch_sysconfig_para: normal_i2c: 0x38. normal_i2c[1]: 0xfffe
[ 18.518624] ctp_init_platform_resource: No power port feature present.
[ 18.520101] ctp_reset.
[ 18.625306] ctp_wakeup.
[ 18.766030] ctp_detect: Detected chip ft5x_ts at adapter 1, address 0x38
[ 18.772001] ====ft5x_ts_probe begin=====.
[ 18.779899] input: ft5x_ts as /devices/platform/sunxi-i2c.1/i2c-1/1-0038/input/input3
[ 18.785075] ctp_set_irq_mode: config gpio to int mode.
[ 18.791060] ctp_set_irq_mode, 225: gpio_int_info, port = 8, port_num = 14.
[ 18.793093] INTERRUPT CONFIG
[ 18.796691] IRQ handler type mismatch for IRQ 60
[ 18.799495] current handler: sunxi-gpio
[ 18.807113] [<c0015340>] (unwind_backtrace+0x0/0x134) from [<c0094b88>] (__setup_irq+0x3b8/0x404)
...
[ 18.936110] [<c0082454>] (sys_init_module+0x78/0x19c) from [<c000ec00>] (ret_fast_syscall+0x0/0x30)
[ 18.940971] ft5x_ts 1-0038: ft5x_ts_probe: request irq failed
[ 18.956486] ------------[ cut here ]------------
[ 18.962015] WARNING: at kernel/irq/manage.c:428 enable_irq+0x3c/0x74()
[ 18.964929] Unbalanced enable for IRQ 60
[ 18.966797] Modules linked in: ft5x_ts(+) sunxi_cedar_mod mali ump gpio_sunxi
[ 18.979457] [<c0015340>] (unwind_backtrace+0x0/0x134) from [<c0037168>] (warn_slowpath_common+0x54/0x64)
...
[ 19.115268] [<c0082454>] (sys_init_module+0x78/0x19c) from [<c000ec00>] (ret_fast_syscall+0x0/0x30)
[ 19.118864] ---[ end trace 85db90c5c3401102 ]---
[ 19.123053] ------------[ cut here ]------------
[ 19.128751] WARNING: at kernel/irq/manage.c:1196 __free_irq+0xa0/0x1e8()
[ 19.131905] Trying to free already-free IRQ 60
[ 19.133751] Modules linked in: ft5x_ts(+) sunxi_cedar_mod mali ump gpio_sunxi
[ 19.146308] [<c0015340>] (unwind_backtrace+0x0/0x134) from [<c0037168>] (warn_slowpath_common+0x54/0x64)
...
[ 19.289233] [<c0082454>] (sys_init_module+0x78/0x19c) from [<c000ec00>] (ret_fast_syscall+0x0/0x30)
[ 19.292840] ---[ end trace 85db90c5c3401103 ]---
[ 19.295335] ==singlethread error =
[ 19.299931] ft5x_ts: probe of 1-0038 failed with error -16
/usr/src/linux-source-3.4.79-sun7i/drivers/input/touchscreen/ft5x_ts.c
cd /usr/src/linux-source-3.4.79-sun7i
cp /boot/config-3.4.79-sun7i .config
cp /usr/src/linux-headers-3.4.79-sun7i/Module.symvers ./
make oldconfig
make prepare
make scripts
make modules SUBDIRS=drivers/input/touchscreen/
make modules_install SUBDIRS=drivers/input/touchscreen/
cp /lib/modules/3.4.79-sun7i/extra/ft5x_ts.ko /lib/modules/3.4.79-sun7i/kernel/drivers/input/touchscreen/
...
ctp_wakeup.
xfer timeout
...
root@Cubian:/home/cubie# i2cdetect 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
if (gpio_request(3, "ft5x")) {
ctp_int_gpio = -1;
pr_err("failed to request ft5x gpio\n");
return -1;
}
ctp_int_gpio = 3;And the worst part is that 3 is not even an option, because as we see here:
if (gpio_request(3, "ft5x")) {ctp_int_gpio = -1; pr_err("failed to request ft5x gpio\n"); return -1; }ctp_int_gpio = 3
Acutally gpio number 3 is from FEX file gpio_para[gpio_para]gpio_used = 1gpio_num = 2gpio_pin_1 = port:PH20<1><default><default><1> ------> corresponding gpio number 1gpio_pin_2 = port:PH21<1><default><default><1> ------> corresponding gpio number 2So here you should change FEx file to :[gpio_para]gpio_used = 1gpio_num = 2gpio_pin_1 = port:PH20<1><default><default><1> ------> corresponding gpio number 1gpio_pin_2 = port:PH21<1><default><default><1> ------> corresponding gpio number 2gpio_pin_2 = port:PH14<default><default><default><default> ------> corresponding gpio number 3------------------ Original ------------------From: "Leonardo"<leoba...@gmail.com>;Date: Fri, Feb 13, 2015 04:24 AMTo: "cubieboard"<cubie...@googlegroups.com>;Subject: [cubieboard] Re: FT5x_TS with Cubieboard 2
--
You received this message because you are subscribed to the Google Groups "Cubieboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cubieboard+...@googlegroups.com.
Visit this group at http://groups.google.com/group/cubieboard.
For more options, visit https://groups.google.com/d/optout.
HiSome error imformation in last mail . Please refer this mailif you use this driver : http://dl.cubieboard.org/parteners/waveshare/Source_Code/a20-cubieboard-dvk/driver%20source/ft5x_ts.cAs your fex file . you may change this
if (gpio_request(3, "ft5x")) {ctp_int_gpio = -1; pr_err("failed to request ft5x gpio\n"); return -1; }ctp_int_gpio = 3
toif (gpio_request(10, "ft5x")) {
ctp_int_gpio = -1; pr_err("failed to request ft5x gpio\n"); return -1; }
ctp_int_gpio = 10;and By the way .about I2c PIN you can just set this in twi1_para of fex file: don't need to set in gpio_para[twi1_para]twi1_used = 1twi1_scl = port:PB18<2><default><default><default>twi1_sda = port:PB19<2><default><default><default>------------------ Original ------------------From: "Leonardo"<leoba...@gmail.com>;Date: Fri, Feb 13, 2015 10:05 AMTo: "孙鹏"<s...@cubietech.com>;Cc: "cubieboard"<cubie...@googlegroups.com>;Subject: Re: [cubieboard] Re: FT5x_TS with Cubieboard 2
Hi lednardodo you try to patch this?- err = request_irq(SW_INT_IRQNO_PIO, ft5x_ts_interrupt, IRQF_TRIGGER_FALLING | IRQF_SHARED, "ft5x_ts", ft5x_ts); + err = request_irq(SW_INT_IRQNO_PIO, ft5x_ts_interrupt, IRQF_SHARED, "ft5x_ts", ft5x_ts);------------------ Original ------------------From: "Leonardo"<leoba...@gmail.com>;
Date: Fri, Feb 13, 2015 10:05 AMTo: "孙鹏"<s...@cubietech.com>;Cc: "cubieboard"<cubie...@googlegroups.com>;
Subject: Re: [cubieboard] Re: FT5x_TS with Cubieboard 2