[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdY7nzzu3-+FwpSYqmX+O559LoXHiqcvP2OxkhX+9f-3wg@mail.gmail.com>
Date: Wed, 26 Feb 2025 11:24:27 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Yixun Lan <dlan@...too.org>
Cc: Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Conor Dooley <conor@...nel.org>, Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Alex Elder <elder@...cstar.com>, Yangyu Chen <cyy@...self.name>,
Jisheng Zhang <jszhang@...nel.org>, Jesse Taube <mr.bossman075@...il.com>,
Inochi Amaoto <inochiama@...look.com>, Icenowy Zheng <uwu@...nowy.me>,
Meng Zhang <zhangmeng.kevin@...ux.spacemit.com>, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, spacemit@...ts.linux.dev
Subject: Re: [PATCH v7 0/4] riscv: spacemit: add gpio support for K1 SoC
On Wed, Feb 26, 2025 at 2:01 AM Yixun Lan <dlan@...too.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
Powered by blists - more mailing lists