ft5x Touchscreen driver under Linux

Started by maggocnx, September 26, 2013, 05:29:01 PM

Previous topic - Next topic

maggocnx

I am trying to get a Touchscreen working which is using the ft5x controller.

My configuration in the script.fex is looking like this


[ctp_para]
ctp_used = 1
ctp_name = "ft5x_ts"
ctp_twi_id = 2
ctp_twi_addr = 0x38
ctp_screen_max_x = 800
ctp_screen_max_y = 480
ctp_revert_x_flag = 0
ctp_revert_y_flag = 0
ctp_exchange_x_y_flag = 0
ctp_int_port = port:PB04<6><default><default><default>
ctp_wakeup = port:PB16<1><default><default><1>
ctp_io_port = port:PB18<2><default><default><default>


I am not sure if I really understand it. I took this from the fex guide and changed some value.
What i dont understand is :

with ctp_twi_id = 2 i choose two wire interface number 2
but what i have to use for ctp_io_port ( i just set it to PB18 cause its can be used as TWI2_SDA) but it not seems right to me.

When i load the ft5x_ts.ko with instmode i get the following kernel messages


<6>===========================ft5x_ts_init=====================
[   42.110000] ===========================ft5x_ts_init=====================
<6>ctp_fetch_sysconfig_para.
[   42.120000] ctp_fetch_sysconfig_para.
<6>ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38. dirty_addr
[   42.130000] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38
<6>ctp_fetch_sysconfig_para: ctp_twi_id is 2.
[   42.150000] ctp_fetch_sysconfig_para: ctp_twi_id is 2.
<6>ctp_fetch_sysconfig_para: screen_max_x = 800.
[   42.160000] ctp_fetch_sysconfig_para: screen_max_x = 800.
<6>ctp_fetch_sysconfig_para: screen_max_y = 480.
[   42.170000] ctp_fetch_sysconfig_para: screen_max_y = 480.
<6>ctp_fetch_sysconfig_para: revert_x_flag = 0.
[   42.180000] ctp_fetch_sysconfig_para: revert_x_flag = 0.
<6>ctp_fetch_sysconfig_para: revert_y_flag = 0.
[   42.190000] ctp_fetch_sysconfig_para: revert_y_flag = 0.
<6>ctp_fetch_sysconfig_para: exchange_x_y_flag = 0.
[   42.200000] ctp_fetch_sysconfig_para: exchange_x_y_flag = 0.
<6>ft5x_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x38. normal_i2c[1]: 0xfffe
[   42.210000] ft5x_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x38. normal_i2c[1]:
<3>script parser fetch err.
[   42.230000] script parser fetch err.
<4>ctp_init_platform_resource: tp_reset request gpio fail!
[   42.230000] ctp_init_platform_resource: tp_reset request gpio fail!
<3>script parser fetch err.
[   42.240000] script parser fetch err.
<6>ctp_init_platform_resource: No power port feature present.
[   42.250000] ctp_init_platform_resource: No power port feature present.
<6>ctp_wakeup.
[   42.260000] ctp_wakeup.
<6>ctp_detect: Detected chip ft5x_ts at adapter 2, address 0x38
[   42.310000] ctp_detect: Detected chip ft5x_ts at adapter 2, address 0x38
<6>====ft5x_ts_probe begin=====. 
[   42.320000] ====ft5x_ts_probe begin=====. 
<6>input: ft5x_ts as /devices/platform/sunxi-i2c.2/i2c-2/2-0038/input/input5
[   42.340000] input: ft5x_ts as /devices/platform/sunxi-i2c.2/i2c-2/2-0038/input/input5
<6>==register_early_suspend =
[   42.360000] ==register_early_suspend =
<6>ctp_set_irq_mode: config gpio to int mode.
[   42.360000] ctp_set_irq_mode: config gpio to int mode.
<6>ctp_set_irq_mode, 225: gpio_int_info, port = 2, port_num = 4.
[   42.390000] ctp_set_irq_mode, 225: gpio_int_info, port = 2, port_num = 4.
<6> INTERRUPT CONFIG
[   42.410000]  INTERRUPT CONFIG
<6>==ft5x_ts_probe over =
[   42.420000] ==ft5x_ts_probe over =




Anybody knows how to properly configure the touch panel ?