Home › Forums › snickerdoodle › • General › MIO Interrupt Handler in Kernel Module
Tagged: MIO, IRQ, interrupts, kernel module, driver
-
AuthorPosts
-
-
I’m trying to use MIO35 on a custom baseboard to generate an interrupt in a kernel module. I see that the wl18xx uses MIO0 for this purpose, however when I look at the dts source I don’t see how it is setting this up. I can look at /proc/interrupts to see that the interrupt for wl18xx is in fact functioning correctly as it occasionally increments. I was wondering if you could shed some light on how to properly receive MIO interrupts in a custom kernel module.
For more details on where I am stuck, see this link to my post on the Xilinx community forums.
-
@Shane I might suggest steering away from creating new kernel drivers as that’s opening up a pretty massive can of worms… Have you looked at the UIO interfaces we have enabled by default? There are a bunch of examples here if that would work for your application: https://github.com/krtkl/uio-test-system
-Cousins
-
Unfortunately, I am constrained to use MIO35 for the push button (custom board is already designed, built, and populated). I can generate interrupts using custom IP in the PL that are handled by custom kernel modules, however using a MIO pin seems to be quite a bit more obfuscated. Any direction you could provide would be helpful.
-
Found a solution on a forum that works.
I had to specify GPIO_INT as 941 (MIO35) and add a device tree entry for gpio_int, but I can now receive and process interrupts through the MIO interface.
My updated device tree entry:
gpio_int {
compatible = “gpio_int”;
interrupt-parent = <&gpio0>;
interrupts = < 35 2>;
};
-
-
AuthorPosts
- You must be logged in to reply to this topic.