From: Herve Codina <herve.codina@bootlin.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Hoan Tran <hoan@os.amperecomputing.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Saravana Kannan <saravanak@google.com>,
Serge Semin <fancer.lancer@gmail.com>,
Phil Edworthy <phil.edworthy@renesas.com>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Pascal Eberhard <pascal.eberhard@se.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v4 7/8] soc: renesas: Add support for Renesas RZ/N1 GPIO Interrupt Multiplexer
Date: Wed, 1 Oct 2025 17:42:05 +0200 [thread overview]
Message-ID: <20251001174205.71a08017@bootlin.com> (raw)
In-Reply-To: <CACRpkdZPURiag1cUQZ319_QA83u+qOCSRALxpe10_+cTcevy+Q@mail.gmail.com>
Hi Linus,
On Wed, 1 Oct 2025 13:08:57 +0200
Linus Walleij <linus.walleij@linaro.org> wrote:
> Hi Herve,
>
> thanks for your patch!
>
> On Mon, Sep 22, 2025 at 5:27 PM Herve Codina (Schneider Electric)
> <herve.codina@bootlin.com> wrote:
>
> > On the Renesas RZ/N1 SoC, GPIOs can generate interruptions. Those
> > interruption lines are multiplexed by the GPIO Interrupt Multiplexer in
> > order to map 32 * 3 GPIO interrupt lines to 8 GIC interrupt lines.
> >
> > The GPIO interrupt multiplexer IP does nothing but select 8 GPIO
> > IRQ lines out of the 96 available to wire them to the GIC input lines.
> >
> > Signed-off-by: Herve Codina (Schneider Electric) <herve.codina@bootlin.com>
>
> This looks like some complicated code to reimplement hierarchical
> irq domains.
>
> Can't you just select IRQ_DOMAIN_HIERARCHY and let
> the existing infrastructure in GPIOLIB_IRQCHIP handle
> this?
>
> This kind of remapping and handling is exactly what the
> .child_to_parent_hwirq() callback in struct gpio_irq_chip
> is for. This function can fail if you run out if IRQ lines.
>
> Inspect drivers/gpio/Kconfig driver that select
> IRQ_DOMAIN_HIERARCHY for examples of how to
> do this.
>
> Even if your GPIO driver is not using GPIOLIB_IRQCHIP (in that
> case: why not?) I think you still need to use IRQ_DOMAIN_HIERARCHY
> for this.
>
I don't see how IRQ_DOMAIN_HIERARCHY would help.
The irq-mux only muxes irq signal without performing any operations usually
done by an interrupt controller.
That's why I used interrupt-map in the irq-mux.
The only information needed by the irq-mux is the interrupt line muxing that
needs to be applied. This information is available in the interrupt-map.
If we introduce IRQ_DOMAIN_HIERARCHY, either it is done at gpio controller
level to route gpio interrupts to GIC interrupts and, in that case, the
irq-mux is skipped and cannot apply the muxing.
Or it is introduced at irq-mux level and irq-mux need to be an interrupt
controller but is component is not an interrupt controller.
Maybe I missed some points or I misunderstood the purpose of
IRQ_DOMAIN_HIERARCHY.
Can you give me some details on how IRQ_DOMAIN_HIERARCHY should be
used in my case?
Best regards,
Hervé
next prev parent reply other threads:[~2025-10-01 15:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 15:26 [PATCH v4 0/8] gpio: renesas: Add support for GPIO and related interrupts in RZ/N1 SoC Herve Codina (Schneider Electric)
2025-09-22 15:26 ` [PATCH v4 1/8] of/irq: Introduce for_each_of_imap_item Herve Codina (Schneider Electric)
2025-09-22 15:26 ` [PATCH v4 2/8] of: unittest: Add a test case for for_each_of_imap_item iterator Herve Codina (Schneider Electric)
2025-09-22 15:26 ` [PATCH v4 3/8] irqchip/ls-extirq: Use " Herve Codina (Schneider Electric)
2025-09-22 15:26 ` [PATCH v4 4/8] irqchip/renesas-rza1: " Herve Codina (Schneider Electric)
2025-09-23 6:56 ` Wolfram Sang
2025-09-22 15:26 ` [PATCH v4 5/8] ARM: dts: r9a06g032: Add GPIO controllers Herve Codina (Schneider Electric)
2025-09-22 17:17 ` Bartosz Golaszewski
2025-09-22 15:26 ` [PATCH v4 6/8] dt-bindings: soc: renesas: Add the Renesas RZ/N1 GPIO Interrupt Multiplexer Herve Codina (Schneider Electric)
2025-09-24 8:07 ` Wolfram Sang
2025-09-24 20:56 ` Wolfram Sang
2025-09-22 15:26 ` [PATCH v4 7/8] soc: renesas: Add support for " Herve Codina (Schneider Electric)
2025-09-24 18:41 ` Wolfram Sang
2025-10-15 11:48 ` Herve Codina
2025-10-01 11:08 ` Linus Walleij
2025-10-01 15:42 ` Herve Codina [this message]
2025-10-13 10:49 ` Linus Walleij
2025-10-14 14:30 ` Wolfram Sang
2025-10-14 20:13 ` Linus Walleij
2025-10-15 6:21 ` Herve Codina
2025-09-22 15:26 ` [PATCH v4 8/8] ARM: dts: r9a06g032: Add support for GPIO interrupts Herve Codina (Schneider Electric)
2025-09-22 15:33 ` Bartosz Golaszewski
2025-09-24 21:48 ` Wolfram Sang
2025-10-15 9:41 ` Herve Codina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251001174205.71a08017@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fancer.lancer@gmail.com \
--cc=geert+renesas@glider.be \
--cc=hoan@os.amperecomputing.com \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=pascal.eberhard@se.com \
--cc=phil.edworthy@renesas.com \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=tglx@linutronix.de \
--cc=thomas.petazzoni@bootlin.com \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).