MT7621 : How to configure GPIO Interrupt in dts file

Hello Guys,

I want to enable GPIO Pin as a Interrupt mode in Unielec - u7621-06 development kit.

My kernel version is 4.4.198 and Openwrt version is 17.01 (lede).

Please help me

Waiting for reply.


It is unlikely that you will get help for such an ancient, maybe even forked, OpenWrt version. Consider updating to the latest codebase first.


Hello @andyboeh

Thank you for your response.

Actually I want to implement whole code in OpenWRT 17.01 (LEDE).

So, if you are aware of how to configure the GPIO as interrupt in dts file then let me know.

Thank you

Your question is missing some important details, most importantly: what would you like the interrupt to do? Trigger a button? Call a script? Do something in the kernel? Trigger something within your program?

Hello @andyboeh

Thank you for your response.

There are mostly GPIOS which are used for below purpose.

For example,

  1. Do something in kernel
  2. trigger something in user space application

Please help me out in these way.

Thank you

Then the kernel driver is responsible for requesting the GPIO and setting up the interrupt, unless you make it configurable in the DTS.

Then the user space application is responsible for setting up the GPIO and getting its status - either via the (deprecated) sysfs or via a GPIO library like libgpiod. I don't know if interrupts are possible.

As an alternative, you can set up your GPIO as a button by using the gpio-keys module - I don't know if this works on mt7621 or on your ancient kernel.

I'm not an expert on dts and GPIOs, but I'm not aware of any generic way to set up an interrupt in dts, this is usually tied to a specific kernel driver.