to make gpio as a interrupt what is the exact device tree notation I have to use.
I am using imx6ulevk board and i want to make GPIO3 22 pin as Interrupt.
these two lines are enough ??
interrupt-parent = <&gpio3>;
interrupts = <22 8>;
where to add these lines in dts file??
and one more doubt what is thee difference between interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH> this line is mentioned in dtsi file and interrupt-parent = <&gpio5>; interrupts = <0 8> these lines are mentioned in dts file.
Hi chandra
device tree interrupts are described on p.8 AN5125 Introduction to Device Trees
http://www.nxp.com/files/32bit/doc/app_note/AN5125.pdf
also gpio is decribed in linux/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
For i.MX6UL usage one can look at "xnur" in ../drivers/input/imx6ul_tsc.c
its irq function adc_irq_fn() is invoked by node:
node &tsc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_tsc>;
xnur-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
in imx6ul-14x14-evk.dts
Another usage gpio interrupt in FT5x06 touchscreen driver:
https://community.nxp.com/thread/430812
Based on these examples one can create own driver with gpio interrupt.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor,
Can you reply the question in original post? "these two lines are enough"?
Thanks,
Winston