I am looking for how to use a gpio as an interrupt using device tree dts file.
previously I did that by using the following code in my dts file
interrupts = <3 30>;
#interrupt-cells = <2>;
interrupt-parent = <&intc>;
where intc is
intc: interrupt-controller {
compatible = "brcm,bcm2708-armctrl-ic";
reg = <0x7e00b200 0x200>;
interrupt-controller;
#interrupt-cells = <2>;
};
But now in 3.18.5 everything changed in the kernel of the rpi, now we need to use the gpio to do the same that we did earlier.
But I stucked in middle of it.
The gpio code is
gpio: gpio {
compatible = "brcm,bcm2835-gpio";
reg = <0x7e200000 0xb4>;
interrupts = <2 17>, <2 18>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
I need to use this gpio node as my interrupt controller.
How can I do that? How to specify which gpio is to be used as the interrupt? Any suggestions are welcome