Home › Forums › snickerdoodle › • General › MIO Interrupt Handler in Kernel Module

Viewing 3 reply threads
  • Author
    Posts
    • Shane
      Participant
      Post count: 28

      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.

    • Ryan Cousins
      Keymaster
      Post count: 343

      @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

    • Shane
      Participant
      Post count: 28

      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.

    • Shane
      Participant
      Post count: 28

      Found a solution on a forum that works.

      https://e2e.ti.com/support/legacy_forums/embedded/linux/f/linux-forum-read-only/437181/gpio-as-interrupt—sysfs-irq-works—kernel-irq-fail

      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>;

      };

Viewing 3 reply threads
  • You must be logged in to reply to this topic.