I really didn’t find much information across documents, regarding to how to use the Orin module’s GPIO as interrupts. I did see a similar topic but it is not about Jetson Orin, FYI, here is the link, GPIO With Interrupts
Any way my question is more focused on the hardware and GPIO capability: Can we use a GPIO as Interrupt to the Orin module processor? And how many ways to configure the Interrupt trigger source (see below list)?
1), Trigger an interrupt at GPIO logic-high state.
2), Trigger an interrupt at GPIO logic-low state.
3), Trigger an interrupt at GPIO falling edge (high-to-low state transition).
4), Trigger an interrupt at GPIO rising edge (low-to-high state transition).
may I know what’s the actual use-case,
please check reference driver for using GPIO interrupt.
for example, $public_sources/kernel_src/hardware/nvidia/platform/t23x/concord/kernel-dts/cvb/tegra234-p3737-0000-a00.dtsi
Thanks for the code sample.
Regarding to your “>> may I know what’s the actual use-case”, let me rephrase my questions as 4-different use cases:
1), A GPIO line enters logic-high state, can it be mapped to generate an interrupt?
2), A GPIO line enters logic-low state, can it be mapped to generate an interrupt?
3), A falling edge occurs on a GPIO line (high-to-low state transition), can it be mapped to generate an interrupt?
4), A rising edge occurs on a GPIO line (low-to-high state transition), can it be mapped to generate an interrupt?
From above code, the “IRQ_TYPE_LEVEL_LOW” appears to generate an interrupt upon logic-low state on a GPIO line which is my use case #2. Now the questions may turn to, how many IRQ TYPE are available?