[OpenWrt-Devel] MT7628, IRQ GPIO
blogic at openwrt.org
Wed Dec 30 11:37:53 EST 2015
On 30/12/2015 15:04, Baptiste Clenet wrote:
> 2015-12-30 11:52 GMT+01:00 Baptiste Clenet <bapclenet at gmail.com>:
>> I'm working on the MT7628 board and I try to register GPIO's irq. (I
>> haven't updated to kernel 4.3, I'm still on the previous version 3.18)
>> I've got two interrupts on GPIO 15 and GPIO 46. I see that to register
>> the interrupts it uses the internal GPIO interrupts (number 6). The
>> fact is, it register one handler for internal GPIO so whenever any of
>> the GPIO's irq (GPIO 15 or 46) are triggered, it always calls the same
>> Does it make sense? I may explain differently if it's not clear.
>> How could I register both handlers? Is there a GPIO-IRQ driver which
>> handle IRQ from GPIO?
>> By the way, thank you for your work on porting mt7628 to kernel 4.3,
>> I'm excited to try!
> As far as I can see in , it seems that it has been implemented with
> the new patches. Is that right?
>  https://dev.openwrt.org/browser/trunk/target/linux/ramips/patches-4.3/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
each gpio has its own dedicated irq number. the driver registers a
proper irq_chip/domain. it only has the code to figure out which irq
needs to be triggered and then calls generic_handle_irq(). hence each
irq can have its own irq handler function in the kernel. this is really
depended on the driver that you hook the irq up to.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel