I have a Goodix touch device that uses i2c interface. This is the doc on how to bind it.
And this my node:
/*my node*/
gt9271@XX {0
value of interrupts
and irq-gpios
properties? The INT pin is connected to GPIO4, which is configured as input and is on HIGH level by default. I've tried different combinations (0 0, 0 1, 1 0, 1 1) but all remains the same.
Thats is good news. Reset and IRQ pins are optional; it seems that is why it is working. But I am afraid that it is not taking these values from dts file.
You are making this pin as interrupt pin by setting it as output which is not possible.
gpiod_direction_output(ts->gpiod_int, ts->client->addr == 0x14);
But good thing which you have comment out is
gpiod_direction_input(ts->gpiod_rst); // I don't know why they are setting it as input. Ideally it should be output.
BTW it is working; so I am happy that your efforts has paid off. you can share the latest code if you have any doubts implementation.
Thanks,
Vinod
device_reset() function is defined on <linux/reset.h>. I know is executed because I can see it through oscilloscope that the reset pin does a falling edge during 10ms.
I think there is a confusion. The driver that I use is an older an simpler version, is the one that I attached on the tar.gz file. I'm NOT using the linked one on github, which is the master version, because that doesn't seems to perform better (reset pin stays always high).
But as you said there is defined
#define GOODIX_GPIO_INT_NAME "irq" //Matching to string in device tree
#define GOODIX_GPIO_RST_NAME "reset" //Matching to string in device tree
and possibly that's the reason it isn't working because I'm not matching the strings? Where on the device tree do I specify these strings?
Thank you.