* [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes @ 2024-09-27 8:15 Wolfram Sang 2024-09-27 8:30 ` Krzysztof Kozlowski 0 siblings, 1 reply; 6+ messages in thread From: Wolfram Sang @ 2024-09-27 8:15 UTC (permalink / raw) To: linux-renesas-soc Cc: Wolfram Sang, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-input, devicetree Allow interrupt-parent in the main node, so it can be inherited to all subnodes. This is more compact and less error-prone. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- It would fix dtbs_check for arch/arm/boot/dts/renesas/r8a7779-marzen.dts and would simplify arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts. Plus, it is the behaviour I would expect. Documentation/devicetree/bindings/input/gpio-keys.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml index cc78c2152921..8fc331e01f7e 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml @@ -15,6 +15,9 @@ properties: - gpio-keys - gpio-keys-polled + interrupt-parent: + description: Common interrupt parent for the following subnodes + autorepeat: true label: -- 2.45.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes 2024-09-27 8:15 [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes Wolfram Sang @ 2024-09-27 8:30 ` Krzysztof Kozlowski 2024-09-27 8:42 ` Wolfram Sang ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Krzysztof Kozlowski @ 2024-09-27 8:30 UTC (permalink / raw) To: Wolfram Sang, linux-renesas-soc Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-input, devicetree On 27/09/2024 10:15, Wolfram Sang wrote: > Allow interrupt-parent in the main node, so it can be inherited to all > subnodes. This is more compact and less error-prone. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > --- > > It would fix dtbs_check for arch/arm/boot/dts/renesas/r8a7779-marzen.dts > and would simplify arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts. > > Plus, it is the behaviour I would expect. > > Documentation/devicetree/bindings/input/gpio-keys.yaml | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml > index cc78c2152921..8fc331e01f7e 100644 > --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml > +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml > @@ -15,6 +15,9 @@ properties: > - gpio-keys > - gpio-keys-polled > > + interrupt-parent: > + description: Common interrupt parent for the following subnodes That's a bit against DT spec: "Nodes that represent interrupt-generating devices contain an interrupt-parent property..." but gpio-keys node you marked as interrupt-parent does not generate interrupts, so I do not think this is correct. If you want less lines in DTS, just switch to interrupts-extended. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes 2024-09-27 8:30 ` Krzysztof Kozlowski @ 2024-09-27 8:42 ` Wolfram Sang 2024-09-27 9:09 ` Geert Uytterhoeven 2024-09-27 21:27 ` Dmitry Torokhov 2 siblings, 0 replies; 6+ messages in thread From: Wolfram Sang @ 2024-09-27 8:42 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-renesas-soc, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-input, devicetree [-- Attachment #1: Type: text/plain, Size: 263 bytes --] > "Nodes that represent interrupt-generating devices contain an > interrupt-parent property..." > > but gpio-keys node you marked as interrupt-parent does not generate > interrupts, so I do not think this is correct. Agreed. Thanks for the heads up. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes 2024-09-27 8:30 ` Krzysztof Kozlowski 2024-09-27 8:42 ` Wolfram Sang @ 2024-09-27 9:09 ` Geert Uytterhoeven 2024-09-27 21:27 ` Dmitry Torokhov 2 siblings, 0 replies; 6+ messages in thread From: Geert Uytterhoeven @ 2024-09-27 9:09 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Wolfram Sang, linux-renesas-soc, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-input, devicetree Hi Krzysztof, On Fri, Sep 27, 2024 at 10:32 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: > If you want less lines in DTS, just switch to interrupts-extended. Oh cool! Documentation/devicetree/bindings/interrupt-controller/interrupts.txt used to explicitly prohibit this use case, but I seem to have missed commit 6df58e485fd002f6 ("dt-bindings: Clarify interrupts-extended usage") lifting that restriction. /me thawes his old patches to make better use of interrupts-extended in Renesas DTS files... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes 2024-09-27 8:30 ` Krzysztof Kozlowski 2024-09-27 8:42 ` Wolfram Sang 2024-09-27 9:09 ` Geert Uytterhoeven @ 2024-09-27 21:27 ` Dmitry Torokhov 2024-09-28 7:26 ` Krzysztof Kozlowski 2 siblings, 1 reply; 6+ messages in thread From: Dmitry Torokhov @ 2024-09-27 21:27 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Wolfram Sang, linux-renesas-soc, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-input, devicetree On Fri, Sep 27, 2024 at 10:30:12AM +0200, Krzysztof Kozlowski wrote: > On 27/09/2024 10:15, Wolfram Sang wrote: > > Allow interrupt-parent in the main node, so it can be inherited to all > > subnodes. This is more compact and less error-prone. > > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > --- > > > > It would fix dtbs_check for arch/arm/boot/dts/renesas/r8a7779-marzen.dts > > and would simplify arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts. > > > > Plus, it is the behaviour I would expect. > > > > Documentation/devicetree/bindings/input/gpio-keys.yaml | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml > > index cc78c2152921..8fc331e01f7e 100644 > > --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml > > +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml > > @@ -15,6 +15,9 @@ properties: > > - gpio-keys > > - gpio-keys-polled > > > > + interrupt-parent: > > + description: Common interrupt parent for the following subnodes > > That's a bit against DT spec: > > "Nodes that represent interrupt-generating devices contain an > interrupt-parent property..." > > but gpio-keys node you marked as interrupt-parent does not generate > interrupts, so I do not think this is correct. I think this can be read multiple ways. The device here is gpio-keys and interrupt-parent would be attached to that node. Children nodes do not represent individual devices, they just a convenient abstraction to describe the hardware. Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes 2024-09-27 21:27 ` Dmitry Torokhov @ 2024-09-28 7:26 ` Krzysztof Kozlowski 0 siblings, 0 replies; 6+ messages in thread From: Krzysztof Kozlowski @ 2024-09-28 7:26 UTC (permalink / raw) To: Dmitry Torokhov Cc: Wolfram Sang, linux-renesas-soc, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-input, devicetree On 27/09/2024 23:27, Dmitry Torokhov wrote: > On Fri, Sep 27, 2024 at 10:30:12AM +0200, Krzysztof Kozlowski wrote: >> On 27/09/2024 10:15, Wolfram Sang wrote: >>> Allow interrupt-parent in the main node, so it can be inherited to all >>> subnodes. This is more compact and less error-prone. >>> >>> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> >>> --- >>> >>> It would fix dtbs_check for arch/arm/boot/dts/renesas/r8a7779-marzen.dts >>> and would simplify arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts. >>> >>> Plus, it is the behaviour I would expect. >>> >>> Documentation/devicetree/bindings/input/gpio-keys.yaml | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml >>> index cc78c2152921..8fc331e01f7e 100644 >>> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml >>> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml >>> @@ -15,6 +15,9 @@ properties: >>> - gpio-keys >>> - gpio-keys-polled >>> >>> + interrupt-parent: >>> + description: Common interrupt parent for the following subnodes >> >> That's a bit against DT spec: >> >> "Nodes that represent interrupt-generating devices contain an >> interrupt-parent property..." >> >> but gpio-keys node you marked as interrupt-parent does not generate >> interrupts, so I do not think this is correct. > > I think this can be read multiple ways. The device here is gpio-keys and > interrupt-parent would be attached to that node. Children nodes do not > represent individual devices, they just a convenient abstraction to > describe the hardware. Not really. There is no device like "gpio-keys". Each key is a separate, independent device. They are no grouped, they do no share anything. From Linux perspective they share, but on hardware - zero common pieces, independent devices. And this is reflected in interrupts property. Individual devices generating interrupts - so each key connected over GPIO - has interrupts property. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-28 7:26 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-09-27 8:15 [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes Wolfram Sang 2024-09-27 8:30 ` Krzysztof Kozlowski 2024-09-27 8:42 ` Wolfram Sang 2024-09-27 9:09 ` Geert Uytterhoeven 2024-09-27 21:27 ` Dmitry Torokhov 2024-09-28 7:26 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox