[PATCH v7 0/4] riscv: spacemit: add gpio support for K1 SoC
Linus Walleij
linus.walleij at linaro.org
Wed Feb 26 02:24:27 PST 2025
On Wed, Feb 26, 2025 at 2:01 AM Yixun Lan <dlan at gentoo.org> wrote:
> Current this v7 version work great with request irq from gpio, like:
> pin = devm_gpiod_get_optional(dev, "myirq", GPIOD_IN);
> irq = gpiod_to_irq(pin);
> devm_request_threaded_irq(dev, irq, ..)
>
> but have problem if request irq via of_irq_get(), something like this:
> DT part
> mytst {
> ..
> interrupt-parent = <&gpio>;
> interrupts = <1 28 IRQ_TYPE_EDGE_RISING>;
> interrupt-names = "wakeup";
> }
>
> In source code
> irq = of_irq_get_byname(dev->of_node, "wakeup");
>
> I've made an attempt to patch gpiolib to support three cells "interrupts"
> syntax, but still fail, it always get last gpio irqchip of four, thus using
> the wrong pin (e.g: will always get 3 from gpiochips 0, 1, 2, 3)
Right, we need a proper patch to fix this.
Can you paste your patch so I can see if I can spot/fix
the problem?
I think the irq cell parser needs to call out to
of_node_instance_match() - or similar - as well.
Yours,
Linus Walleij
More information about the linux-riscv
mailing list