Hi,
I am interfacing TSC2004 touch screen controller with imx6q. I have compiled the image using build root and able to communicate with controller using i2c. interrupt of the controller is mapped to GPIO, i have specified the same in dtb file.
but when probe function is executed it calls "of_get_named_gpio_flags" which return with -2. The same value is passed to "gpio_is_valid" function further which in turn return error.
Any help would be appreciated.
Hi surajkumar
this may be due to wrong gpio name or assignment, please check
boundary devices TSC2004 example in imx6qdl-sabrelite.dtsi :
https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_4.1.15_1.0.0_ga/arch/arm/boot/dts/im...
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igorpadykov ,
Thanks for reply,
As suggested by you i was assigning wrong pin which physically it was connected to interrupt. But now i have change but still problem persist.
Below is the imx6qdl-sabrelite.dtsi changes i made.
ORIGINAL
pinctrl_i2c3_tsc2004: i2c3-tsc2004grp {
fsl,pins = <
#define GPIRQ_TSC2004 <&gpio4 20 IRQ_TYPE_EDGE_FALLING>
#define GP_TSC2004 <&gpio4 20 GPIO_ACTIVE_LOW>
MX6QDL_PAD_DI0_PIN4__GPIO4_IO20 0x1b0b0 /* tsc2004 interrupt */
>;
};
CHNANGED
pinctrl_i2c3_tsc2004: i2c3-tsc2004grp {
fsl,pins = <
#define GPIRQ_TSC2004 <&gpio1 09 IRQ_TYPE_EDGE_FALLING>
#define GP_TSC2004 <&gpio1 09 GPIO_ACTIVE_LOW>
MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x1b0b0
>;
};
Physically interrupt from the tsc controller is connected to GPIO9 (which is not multiplexed).
The above change is valid or any correction is required.