Re: gpio-mt7621 unroutable IRQs to bank0
From: Thomas Gleixner
Date: Tue May 05 2026 - 10:25:33 EST
On Tue, May 05 2026 at 14:01, Linus Walleij wrote:
> On Sat, May 2, 2026 at 11:52 PM Vicente Bergas <vicencb@xxxxxxxxx> wrote:
>> As a way to prove that this is indeed the problem,
>> the following workaround makes it work.
>> It just inverts the sorting order of all matches,
>> so it picks Bank0 instead of Bank2.
>
> That's a tricksy bug, I can't exactly see where the issue
> is.
>
> I think to solve this you might need to allocate an external
> irqdomain that deal with the three different gpiochip
> instances when translating the irqs.
struct gpio_chip has this:
/**
* @of_node_instance_match:
*
* Determine if a chip is the right instance. Must be implemented by
* any driver using more than one gpio_chip per device tree node.
* Returns true if gc is the instance indicated by i (which is the
* first cell in the phandles for GPIO lines and gpio-ranges).
*/
bool (*of_node_instance_match)(struct gpio_chip *gc, unsigned int i);
That driver falls in the category and lacks that callback, no?
Thanks,
tglx