Hi,
We use our custom board with iMX6ul. I need to configure GPIO inputs to generate interrupts on falling edge. For some reason interrupt fires both on falling and rising edges.
GPIOs settings in the device tree:
pinctrl_rotstab: rotstab {
fsl,pins = <
MX6UL_PAD_CSI_DATA02__GPIO4_IO23 0x1080
MX6UL_PAD_CSI_DATA03__GPIO4_IO24 0x1080
>;
};
rotary-stability {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_rotstab>;
ccw-2 {
label = "counterclockwise-2";
interrupts-extended = <&gpio4 24 IRQ_TYPE_EDGE_FALLING>;
linux,code = <KEY_LEFT>;
};
cw-2 {
label = "clockwise-2";
interrupts-extended = <&gpio4 23 IRQ_TYPE_EDGE_FALLING>;
linux,code = <KEY_RIGHT>;
};
};
I also checked GPIO4_ICR2 and GPIO4_EDGE_SEL register values. Everything is set up correctly, ICR register holds values corresponding to falling edge interrupts, EDGE_SEL register is zero. But for some reason interrupt is generated on both rising and fallling edges.
I already saw this https://community.nxp.com/t5/i-MX-Processors/MX6ul-var-dart-dtsi-for-gpio-input-only-on-falling-edge... post with the same problem but there was no solution there.
Thanks in advance