Can you check the value of client->irq? It is probably 0 which would explain the return value of EINVAL -22. In the probe function please make sure you get the correct values in pdata->reset_pin and pdata->irq_pin. In the probe function after requesting gpio for IRQ with gpio_request_one, make sure to call gpio_to_irq on pdata->irq_pin, assign this to client->irq and then pass this in devm_request_threaded_irq. Please have a look at our Fusion driver code.
What is the error value now and where exactly in probe does it fail now? pdata->irq_pin seems to have correct value as per your assignment of it to APALIS_GPIO7.
@kamil Can you share the error code after adding the change with gpio_to_irq and where it fails? For some reason, I cannot seem to see my comment and your original comment.
@kamil Are your sure edt-ft5x06 is also applicable for FT5446? May be FT5446 uses a different CRC which is calculated here or a different protocol as the message comes from here? Can you cross check with the datasheet and manufacturer?
I`m very sorry, but I have removed my post because it was my bug. During testing I have changed client->irq to pdata->irq_pin in request_threaded_irq function, and that was the issue. Now I have swapped back, and function request_threaded_irq is loading OK. I saw another question with similar issue here question
and maybe that guy would be still interested with resolving this problem.
Dear Sir,
Im not sure about it, and Im aware, that it could be the issue but still have to prepare a proper driver for this touchscreen. Do you have any idea, where can I find protocol documentation for the FT5446 chip? I was looking on the internet, but didn`t found anything. I have also emailed Focal Tech support but without any response.
@kamil We do not have any particular information. Focaltech would be the best contact point. However looking at the driver in more recent kernels might give an idea. What exactly is the value of rdbuf[0], rdbuf1 and rdbuf2 in ISR edt_ft5x06_ts_isr? The driver in a more recent kernel like 4.4 which we use for Vybrid here looks for two different protocols viz. M06 and M09. Perhaps the FT5446 uses the M09 protocol. I know for a fact that FT6236 uses M09. The M09 protocol does not seem to use CRC or a header. You can try by adapting your existing driver to accomodate the M09 protocol using this driver in 4.4 kernel as reference.