[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqL3PGqmzA0wW37G7TXhbRVgByznk==Q8GhA0_OFBKAycQ@mail.gmail.com>
Date: Fri, 7 Jan 2022 09:20:05 -0600
From: Rob Herring <robh@...nel.org>
To: Suman Anna <s-anna@...com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>,
Jassi Brar <jassisinghbrar@...il.com>,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
Richard Fitzgerald <rf@...nsource.cirrus.com>,
Lee Jones <lee.jones@...aro.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Greentime Hu <greentime.hu@...ive.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Palmer Dabbelt <palmer@...belt.com>,
Michal Simek <michal.simek@...inx.com>,
- <patches@...nsource.cirrus.com>,
John Crispin <john@...ozen.org>,
Hauke Mehrtens <hauke@...ke-m.de>,
Kumar Gogada <bharat.kumar.gogada@...inx.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
devicetree@...r.kernel.org,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux-ALSA <alsa-devel@...a-project.org>,
netdev <netdev@...r.kernel.org>, PCI <linux-pci@...r.kernel.org>,
linux-riscv <linux-riscv@...ts.infradead.org>,
"Nagalla, Hari" <hnagalla@...com>
Subject: Re: [PATCH] dt-bindings: Drop required 'interrupt-parent'
On Fri, Jan 7, 2022 at 8:27 AM Suman Anna <s-anna@...com> wrote:
>
> Hi Rob,
>
> On 1/6/22 9:19 PM, Rob Herring wrote:
> > 'interrupt-parent' is never required as it can be in a parent node or a
> > parent node itself can be an interrupt provider. Where exactly it lives is
> > outside the scope of a binding schema.
> >
> > Signed-off-by: Rob Herring <robh@...nel.org>
> > ---
> > .../devicetree/bindings/gpio/toshiba,gpio-visconti.yaml | 1 -
> > .../devicetree/bindings/mailbox/ti,omap-mailbox.yaml | 9 ---------
> > Documentation/devicetree/bindings/mfd/cirrus,madera.yaml | 1 -
> > .../devicetree/bindings/net/lantiq,etop-xway.yaml | 1 -
> > .../devicetree/bindings/net/lantiq,xrx200-net.yaml | 1 -
> > .../devicetree/bindings/pci/sifive,fu740-pcie.yaml | 1 -
> > .../devicetree/bindings/pci/xilinx-versal-cpm.yaml | 1 -
> > 7 files changed, 15 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml b/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> > index 9ad470e01953..b085450b527f 100644
> > --- a/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> > +++ b/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> > @@ -43,7 +43,6 @@ required:
> > - gpio-controller
> > - interrupt-controller
> > - "#interrupt-cells"
> > - - interrupt-parent
> >
> > additionalProperties: false
> >
> > diff --git a/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
> > index e864d798168d..d433e496ec6e 100644
> > --- a/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
> > +++ b/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
> > @@ -175,15 +175,6 @@ required:
> > - ti,mbox-num-fifos
> >
> > allOf:
> > - - if:
> > - properties:
> > - compatible:
> > - enum:
> > - - ti,am654-mailbox
> > - then:
> > - required:
> > - - interrupt-parent
> > -
>
> There are multiple interrupt controllers on TI K3 devices, and we need this
> property to be defined _specifically_ to point to the relevant interrupt router
> parent node.
>
> While what you state in general is true, I cannot have a node not define this on
> K3 devices, and end up using the wrong interrupt parent (GIC
> interrupt-controller). That's why the conditional compatible check.
But you could.
The parent node can have a default interrupt-parent and child nodes
can override that. It doesn't matter which one is the default though
typically you would want the one used the most to be the default.
Looking at your dts files, it looks like you all did the opposite. The
only way that wouldn't work is if the parent node is if the parent
node has its own 'interrupts' or you are just abusing
'interrupt-parent' where the standard parsing doesn't work.
You are also free to use 'interrupts-extended' anywhere 'interrupts'
is used and then interrupt-parent being present is an error. How you
structure all this is outside the scope of binding schemas which only
need to define how many interrupts and what are they. Ensuring parents
and cell sizes are correct is mostly done by dtc.
Rob
Powered by blists - more mailing lists