devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] another 'interrupts-extended' replacement needed?
@ 2025-10-06 17:21 Wolfram Sang
  2025-10-06 17:21 ` [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Wolfram Sang @ 2025-10-06 17:21 UTC (permalink / raw)
  To: linux-renesas-soc, Rob Herring
  Cc: Wolfram Sang, Andy Shevchenko, Conor Dooley, David Lechner,
	devicetree, Geert Uytterhoeven, Jonathan Cameron,
	Krzysztof Kozlowski, Lars-Peter Clausen, linux-iio, Magnus Damm,
	Michael Hennerich, Nuno Sá

Hi Rob,

I want to fix the following 'dtbs_check' issue:

arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: accelerometer@1d (adi,adxl345): interrupts-extended: [[18, 2, 4], [18, 3, 4]] is too long
	from schema $id: http://devicetree.org/schemas/iio/accel/adi,adxl345.yaml#

However, this series uncovers another place where 'interrupts-extended'
is not recognized as an alternative to 'interrupts'. Namely, when this
is part of a 'dependencies:' like in this binding:

arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: accelerometer@1d (adi,adxl345): 'interrupts' is a dependency of 'interrupt-names'
	from schema $id: http://devicetree.org/schemas/iio/accel/adi,adxl345.yaml#

Now, I wonder if this also needs to be fixed in dtschema? Or do we need
another way to express the dependency?

Thanks for any pointers,

   Wolfram


Wolfram Sang (2):
  dt-bindings: iio: accel: adxl345: document second interrupt
  ARM: dts: renesas: kzm9g: name interrupts for accelerometer

 .../bindings/iio/accel/adi,adxl345.yaml          | 16 +++++++++++-----
 arch/arm/boot/dts/renesas/sh73a0-kzm9g.dts       |  1 +
 2 files changed, 12 insertions(+), 5 deletions(-)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt
  2025-10-06 17:21 [RFC PATCH 0/2] another 'interrupts-extended' replacement needed? Wolfram Sang
@ 2025-10-06 17:21 ` Wolfram Sang
  2025-10-08  9:51   ` Geert Uytterhoeven
  2025-10-09 20:47   ` Rob Herring
  2025-10-06 17:21 ` [RFC PATCH 2/2] ARM: dts: renesas: kzm9g: name interrupts for accelerometer Wolfram Sang
  2025-10-09 20:35 ` [RFC PATCH 0/2] another 'interrupts-extended' replacement needed? Rob Herring
  2 siblings, 2 replies; 13+ messages in thread
From: Wolfram Sang @ 2025-10-06 17:21 UTC (permalink / raw)
  To: linux-renesas-soc, Rob Herring
  Cc: Wolfram Sang, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree

The pinout of all the supported chips in this binding have two interrupt
pins. Document the second one, too, even though the Linux driver
currently does not support the second interrupt. Boards may have it
wired nonetheless.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Passes dt_binding_check. But uncovers another issue. See coverletter.

 .../bindings/iio/accel/adi,adxl345.yaml          | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
index a23a626bfab6..806b0250ec07 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
@@ -35,11 +35,16 @@ properties:
   spi-3wire: true
 
   interrupts:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
 
   interrupt-names:
-    items:
-      - enum: [INT1, INT2]
+    oneOf:
+      - items:
+          - enum: [INT1, INT2]
+      - items:
+          - const: INT1
+          - const: INT2
 
 dependencies:
   interrupts: [ interrupt-names ]
@@ -84,7 +89,8 @@ examples:
             spi-cpol;
             spi-cpha;
             interrupt-parent = <&gpio0>;
-            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
-            interrupt-names = "INT2";
+            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>,
+                         <1 IRQ_TYPE_LEVEL_HIGH>;
+            interrupt-names = "INT1", "INT2";
         };
     };
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC PATCH 2/2] ARM: dts: renesas: kzm9g: name interrupts for accelerometer
  2025-10-06 17:21 [RFC PATCH 0/2] another 'interrupts-extended' replacement needed? Wolfram Sang
  2025-10-06 17:21 ` [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt Wolfram Sang
@ 2025-10-06 17:21 ` Wolfram Sang
  2025-10-08  9:51   ` Geert Uytterhoeven
  2025-10-09 20:35 ` [RFC PATCH 0/2] another 'interrupts-extended' replacement needed? Rob Herring
  2 siblings, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2025-10-06 17:21 UTC (permalink / raw)
  To: linux-renesas-soc, Rob Herring
  Cc: Wolfram Sang, Geert Uytterhoeven, Magnus Damm,
	Krzysztof Kozlowski, Conor Dooley, devicetree

Per the updated binding documentation, both interrupts must be named.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

This uncovers another issue. See coverletter.

 arch/arm/boot/dts/renesas/sh73a0-kzm9g.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/renesas/sh73a0-kzm9g.dts b/arch/arm/boot/dts/renesas/sh73a0-kzm9g.dts
index 1ce07d0878dc..0a9cd61bcb5f 100644
--- a/arch/arm/boot/dts/renesas/sh73a0-kzm9g.dts
+++ b/arch/arm/boot/dts/renesas/sh73a0-kzm9g.dts
@@ -209,6 +209,7 @@ accelerometer@1d {
 		reg = <0x1d>;
 		interrupts-extended = <&irqpin3 2 IRQ_TYPE_LEVEL_HIGH>,
 				      <&irqpin3 3 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "INT1", "INT2";
 	};
 
 	rtc@32 {
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt
  2025-10-06 17:21 ` [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt Wolfram Sang
@ 2025-10-08  9:51   ` Geert Uytterhoeven
  2025-10-09 20:47   ` Rob Herring
  1 sibling, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-10-08  9:51 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Rob Herring, Lars-Peter Clausen,
	Michael Hennerich, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Krzysztof Kozlowski, Conor Dooley, linux-iio,
	devicetree

On Tue, 7 Oct 2025 at 01:20, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> The pinout of all the supported chips in this binding have two interrupt
> pins. Document the second one, too, even though the Linux driver
> currently does not support the second interrupt. Boards may have it
> wired nonetheless.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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] 13+ messages in thread

* Re: [RFC PATCH 2/2] ARM: dts: renesas: kzm9g: name interrupts for accelerometer
  2025-10-06 17:21 ` [RFC PATCH 2/2] ARM: dts: renesas: kzm9g: name interrupts for accelerometer Wolfram Sang
@ 2025-10-08  9:51   ` Geert Uytterhoeven
  0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-10-08  9:51 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Rob Herring, Geert Uytterhoeven, Magnus Damm,
	Krzysztof Kozlowski, Conor Dooley, devicetree

On Mon, 6 Oct 2025 at 19:21, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Per the updated binding documentation, both interrupts must be named.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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] 13+ messages in thread

* Re: [RFC PATCH 0/2] another 'interrupts-extended' replacement needed?
  2025-10-06 17:21 [RFC PATCH 0/2] another 'interrupts-extended' replacement needed? Wolfram Sang
  2025-10-06 17:21 ` [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt Wolfram Sang
  2025-10-06 17:21 ` [RFC PATCH 2/2] ARM: dts: renesas: kzm9g: name interrupts for accelerometer Wolfram Sang
@ 2025-10-09 20:35 ` Rob Herring
  2025-10-09 20:38   ` Rob Herring
  2 siblings, 1 reply; 13+ messages in thread
From: Rob Herring @ 2025-10-09 20:35 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Andy Shevchenko, Conor Dooley, David Lechner,
	devicetree, Geert Uytterhoeven, Jonathan Cameron,
	Krzysztof Kozlowski, Lars-Peter Clausen, linux-iio, Magnus Damm,
	Michael Hennerich, Nuno Sá

On Mon, Oct 06, 2025 at 07:21:16PM +0200, Wolfram Sang wrote:
> Hi Rob,
> 
> I want to fix the following 'dtbs_check' issue:
> 
> arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: accelerometer@1d (adi,adxl345): interrupts-extended: [[18, 2, 4], [18, 3, 4]] is too long
> 	from schema $id: http://devicetree.org/schemas/iio/accel/adi,adxl345.yaml#
> 
> However, this series uncovers another place where 'interrupts-extended'
> is not recognized as an alternative to 'interrupts'. Namely, when this
> is part of a 'dependencies:' like in this binding:
> 
> arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: accelerometer@1d (adi,adxl345): 'interrupts' is a dependency of 'interrupt-names'
> 	from schema $id: http://devicetree.org/schemas/iio/accel/adi,adxl345.yaml#
> 
> Now, I wonder if this also needs to be fixed in dtschema? Or do we need
> another way to express the dependency?

In this case, the 'interrupt-names: [ interrupts ]' dependency should be 
dropped because that's *always* the dependency and the core handles it 
correctly:

dependencies:
  interrupt-names:
    oneOf:
      - required:
          - interrupts
      - required:
          - interrupts-extended

Rob

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC PATCH 0/2] another 'interrupts-extended' replacement needed?
  2025-10-09 20:35 ` [RFC PATCH 0/2] another 'interrupts-extended' replacement needed? Rob Herring
@ 2025-10-09 20:38   ` Rob Herring
  2025-10-09 21:47     ` Wolfram Sang
  0 siblings, 1 reply; 13+ messages in thread
From: Rob Herring @ 2025-10-09 20:38 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Andy Shevchenko, Conor Dooley, David Lechner,
	devicetree, Geert Uytterhoeven, Jonathan Cameron,
	Krzysztof Kozlowski, Lars-Peter Clausen, linux-iio, Magnus Damm,
	Michael Hennerich, Nuno Sá

On Thu, Oct 9, 2025 at 3:35 PM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Oct 06, 2025 at 07:21:16PM +0200, Wolfram Sang wrote:
> > Hi Rob,
> >
> > I want to fix the following 'dtbs_check' issue:
> >
> > arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: accelerometer@1d (adi,adxl345): interrupts-extended: [[18, 2, 4], [18, 3, 4]] is too long
> >       from schema $id: http://devicetree.org/schemas/iio/accel/adi,adxl345.yaml#
> >
> > However, this series uncovers another place where 'interrupts-extended'
> > is not recognized as an alternative to 'interrupts'. Namely, when this
> > is part of a 'dependencies:' like in this binding:
> >
> > arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: accelerometer@1d (adi,adxl345): 'interrupts' is a dependency of 'interrupt-names'
> >       from schema $id: http://devicetree.org/schemas/iio/accel/adi,adxl345.yaml#
> >
> > Now, I wonder if this also needs to be fixed in dtschema? Or do we need
> > another way to express the dependency?
>
> In this case, the 'interrupt-names: [ interrupts ]' dependency should be
> dropped because that's *always* the dependency and the core handles it
> correctly:
>
> dependencies:
>   interrupt-names:
>     oneOf:
>       - required:
>           - interrupts
>       - required:
>           - interrupts-extended

However, the "interrupts: [ interrupt-names ]" depend is not handled
correctly. It would allow 'interrupts-extended' without
'interrupt-names'.

I'll make a fix.

Rob

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt
  2025-10-06 17:21 ` [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt Wolfram Sang
  2025-10-08  9:51   ` Geert Uytterhoeven
@ 2025-10-09 20:47   ` Rob Herring
  2025-10-09 21:44     ` Wolfram Sang
  2025-10-10  7:55     ` Geert Uytterhoeven
  1 sibling, 2 replies; 13+ messages in thread
From: Rob Herring @ 2025-10-09 20:47 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree

On Mon, Oct 06, 2025 at 07:21:17PM +0200, Wolfram Sang wrote:
> The pinout of all the supported chips in this binding have two interrupt
> pins. Document the second one, too, even though the Linux driver
> currently does not support the second interrupt. Boards may have it
> wired nonetheless.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> Passes dt_binding_check. But uncovers another issue. See coverletter.
> 
>  .../bindings/iio/accel/adi,adxl345.yaml          | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> index a23a626bfab6..806b0250ec07 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> @@ -35,11 +35,16 @@ properties:
>    spi-3wire: true
>  
>    interrupts:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2
>  
>    interrupt-names:
> -    items:
> -      - enum: [INT1, INT2]
> +    oneOf:
> +      - items:
> +          - enum: [INT1, INT2]
> +      - items:
> +          - const: INT1
> +          - const: INT2

This is better written as:

minItems: 1
items:
  - enum: [INT1, INT2]
  - const: INT2

It is mainly better because using 'oneOf' results in poor error 
messages.

Rob

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt
  2025-10-09 20:47   ` Rob Herring
@ 2025-10-09 21:44     ` Wolfram Sang
  2025-11-06  8:44       ` Geert Uytterhoeven
  2025-10-10  7:55     ` Geert Uytterhoeven
  1 sibling, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2025-10-09 21:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-renesas-soc, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]


> > +    oneOf:
> > +      - items:
> > +          - enum: [INT1, INT2]
> > +      - items:
> > +          - const: INT1
> > +          - const: INT2
> 
> This is better written as:
> 
> minItems: 1
> items:
>   - enum: [INT1, INT2]
>   - const: INT2
> 
> It is mainly better because using 'oneOf' results in poor error 
> messages.

But wouldn't that allow naming both interrupts INT2? Or is this
magically prevented somehow?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC PATCH 0/2] another 'interrupts-extended' replacement needed?
  2025-10-09 20:38   ` Rob Herring
@ 2025-10-09 21:47     ` Wolfram Sang
  2025-10-10  9:39       ` Wolfram Sang
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2025-10-09 21:47 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-renesas-soc, Andy Shevchenko, Conor Dooley, David Lechner,
	devicetree, Geert Uytterhoeven, Jonathan Cameron,
	Krzysztof Kozlowski, Lars-Peter Clausen, linux-iio, Magnus Damm,
	Michael Hennerich, Nuno Sá

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]


> However, the "interrupts: [ interrupt-names ]" depend is not handled
> correctly. It would allow 'interrupts-extended' without
> 'interrupt-names'.
> 
> I'll make a fix.

So, even after your fix, the above dependency needs to stay in this
binding document? Did I get this right?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt
  2025-10-09 20:47   ` Rob Herring
  2025-10-09 21:44     ` Wolfram Sang
@ 2025-10-10  7:55     ` Geert Uytterhoeven
  1 sibling, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-10-10  7:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Wolfram Sang, linux-renesas-soc, Lars-Peter Clausen,
	Michael Hennerich, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Krzysztof Kozlowski, Conor Dooley, linux-iio,
	devicetree

Hi Rob,

On Thu, 9 Oct 2025 at 23:22, Rob Herring <robh@kernel.org> wrote:
> On Mon, Oct 06, 2025 at 07:21:17PM +0200, Wolfram Sang wrote:
> > The pinout of all the supported chips in this binding have two interrupt
> > pins. Document the second one, too, even though the Linux driver
> > currently does not support the second interrupt. Boards may have it
> > wired nonetheless.
> >
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > ---
> >
> > Passes dt_binding_check. But uncovers another issue. See coverletter.
> >
> >  .../bindings/iio/accel/adi,adxl345.yaml          | 16 +++++++++++-----
> >  1 file changed, 11 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > index a23a626bfab6..806b0250ec07 100644
> > --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > @@ -35,11 +35,16 @@ properties:
> >    spi-3wire: true
> >
> >    interrupts:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
> >
> >    interrupt-names:
> > -    items:
> > -      - enum: [INT1, INT2]
> > +    oneOf:
> > +      - items:
> > +          - enum: [INT1, INT2]
> > +      - items:
> > +          - const: INT1
> > +          - const: INT2
>
> This is better written as:
>
> minItems: 1
> items:
>   - enum: [INT1, INT2]
>   - const: INT2
>
> It is mainly better because using 'oneOf' results in poor error
> messages.

For those that missed the other email, where you explained about
listing strings like "INT2" twice:

    "That's because we require strings to be unique entries".

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] 13+ messages in thread

* Re: [RFC PATCH 0/2] another 'interrupts-extended' replacement needed?
  2025-10-09 21:47     ` Wolfram Sang
@ 2025-10-10  9:39       ` Wolfram Sang
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfram Sang @ 2025-10-10  9:39 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-renesas-soc, Andy Shevchenko, Conor Dooley, David Lechner,
	devicetree, Geert Uytterhoeven, Jonathan Cameron,
	Krzysztof Kozlowski, Lars-Peter Clausen, linux-iio, Magnus Damm,
	Michael Hennerich, Nuno Sá

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]


> So, even after your fix, the above dependency needs to stay in this
> binding document? Did I get this right?

Keeping the dependency and using your improved dt-schema makes all
warnings go away. Thank you!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt
  2025-10-09 21:44     ` Wolfram Sang
@ 2025-11-06  8:44       ` Geert Uytterhoeven
  0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-11-06  8:44 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Rob Herring, linux-renesas-soc, Lars-Peter Clausen,
	Michael Hennerich, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Krzysztof Kozlowski, Conor Dooley, linux-iio,
	devicetree

Hi Wolfram,

On Sun, 12 Oct 2025 at 02:01, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > > +    oneOf:
> > > +      - items:
> > > +          - enum: [INT1, INT2]
> > > +      - items:
> > > +          - const: INT1
> > > +          - const: INT2
> >
> > This is better written as:
> >
> > minItems: 1
> > items:
> >   - enum: [INT1, INT2]
> >   - const: INT2
> >
> > It is mainly better because using 'oneOf' results in poor error
> > messages.
>
> But wouldn't that allow naming both interrupts INT2? Or is this
> magically prevented somehow?

    "That's because we require strings to be unique entries, so [...]
twice will be rejected."

https://lore.kernel.org/all/20251009200054.GA3245555-robh@kernel.org/

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] 13+ messages in thread

end of thread, other threads:[~2025-11-06  8:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-06 17:21 [RFC PATCH 0/2] another 'interrupts-extended' replacement needed? Wolfram Sang
2025-10-06 17:21 ` [RFC PATCH 1/2] dt-bindings: iio: accel: adxl345: document second interrupt Wolfram Sang
2025-10-08  9:51   ` Geert Uytterhoeven
2025-10-09 20:47   ` Rob Herring
2025-10-09 21:44     ` Wolfram Sang
2025-11-06  8:44       ` Geert Uytterhoeven
2025-10-10  7:55     ` Geert Uytterhoeven
2025-10-06 17:21 ` [RFC PATCH 2/2] ARM: dts: renesas: kzm9g: name interrupts for accelerometer Wolfram Sang
2025-10-08  9:51   ` Geert Uytterhoeven
2025-10-09 20:35 ` [RFC PATCH 0/2] another 'interrupts-extended' replacement needed? Rob Herring
2025-10-09 20:38   ` Rob Herring
2025-10-09 21:47     ` Wolfram Sang
2025-10-10  9:39       ` Wolfram Sang

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).