Hi ,
We are using GPIO12 (pin S142) NXP i.MX 8M Plus: MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x19 for one of our usecase and configured as a input and we have a externel pull up resistor of 4.7K ohm . When we configure that as only falling edge we are seeing interrupt for both the rising edge and falling edge Please help us in solving this problem what change we need to do for make it work.
Hi
I would suggest you
1. Please make sure the gpio is configured for falling edge only, for example
Ensure you are using IRQ_TYPE_EDGE_FALLING and not IRQ_TYPE_EDGE_BOTH
2. check the Pad control flag.
The pad control value 0x19 might not be enabling input correctly, Try to use a more explicit configuration like
MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x130
where 0x130 enables input / pull-up / medium drive strength.
Regards
Daniel
Hi Daniel,
I have tried by setting configuration like
MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x130
But still im facing interrupt is coming for both the edges as we are not using the dtsi file to add like this entry interrupt-parent = <&gpio4>;
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
we have a driver which will have below code to request for falling edge only :-
if (request_irq(irqNumber, irq_handler, IRQF_TRIGGER_FALLING, "device", (void *)(irq_handler))) {
printk(KERN_INFO "my_device: cannot register IRQ ");
goto irq;
So please help how to resolve this issue .Is something from GIC will set to both edge type ?
Hi
I would suggest you check the GPIO4_ICR2 register, to get the real trigger type configured.
Bit 6-7 correspond to pin 19.
If you are not using DTS, ensure you explicitly set the IRQ type in your driver before calling request_irq( );
Regards
Daniel