diff mbox series

dt-bindings: iio: adc: ad7192: Fix 'single-channel' constraints

Message ID 20240723230904.1299744-1-robh@kernel.org (mailing list archive)
State Accepted
Headers show
Series dt-bindings: iio: adc: ad7192: Fix 'single-channel' constraints | expand

Commit Message

Rob Herring (Arm) July 23, 2024, 11:09 p.m. UTC
The 'single-channel' property is an uint32, not an array, so 'items' is
an incorrect constraint. This didn't matter until dtschema recently
changed how properties are decoded. This results in this warning:

Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dtb: adc@0: \
  channel@1:single-channel: 1 is not of type 'array'

Fixes: caf7b7632b8d ("dt-bindings: iio: adc: ad7192: Add AD7194 support")
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Conor Dooley July 24, 2024, 4:42 p.m. UTC | #1
On Tue, Jul 23, 2024 at 06:09:03PM -0500, Rob Herring (Arm) wrote:
> The 'single-channel' property is an uint32, not an array, so 'items' is
> an incorrect constraint. This didn't matter until dtschema recently
> changed how properties are decoded. This results in this warning:
> 
> Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dtb: adc@0: \
>   channel@1:single-channel: 1 is not of type 'array'
> 
> Fixes: caf7b7632b8d ("dt-bindings: iio: adc: ad7192: Add AD7194 support")

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> index a03da9489ed9..190889c7b62a 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> @@ -120,9 +120,8 @@ patternProperties:
>          description:
>            Positive input can be connected to pins AIN1 to AIN16 by choosing the
>            appropriate value from 1 to 16. Negative input is connected to AINCOM.
> -        items:
> -          minimum: 1
> -          maximum: 16
> +        minimum: 1
> +        maximum: 16
>  
>      oneOf:
>        - required:
> -- 
> 2.43.0
>
Rob Herring (Arm) July 26, 2024, 6:52 p.m. UTC | #2
On Tue, 23 Jul 2024 18:09:03 -0500, Rob Herring (Arm) wrote:
> The 'single-channel' property is an uint32, not an array, so 'items' is
> an incorrect constraint. This didn't matter until dtschema recently
> changed how properties are decoded. This results in this warning:
> 
> Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dtb: adc@0: \
>   channel@1:single-channel: 1 is not of type 'array'
> 
> Fixes: caf7b7632b8d ("dt-bindings: iio: adc: ad7192: Add AD7194 support")
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 

I have other fixes for rc1 already, so I've applied this one.

Rob
Jonathan Cameron July 27, 2024, 3:10 p.m. UTC | #3
On Fri, 26 Jul 2024 13:52:58 -0500
"Rob Herring (Arm)" <robh@kernel.org> wrote:

> On Tue, 23 Jul 2024 18:09:03 -0500, Rob Herring (Arm) wrote:
> > The 'single-channel' property is an uint32, not an array, so 'items' is
> > an incorrect constraint. This didn't matter until dtschema recently
> > changed how properties are decoded. This results in this warning:
> > 
> > Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dtb: adc@0: \
> >   channel@1:single-channel: 1 is not of type 'array'
> > 
> > Fixes: caf7b7632b8d ("dt-bindings: iio: adc: ad7192: Add AD7194 support")
> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >   
> 
> I have other fixes for rc1 already, so I've applied this one.
> 
> Rob

Cool
For the record (no need to add to patch!)
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
index a03da9489ed9..190889c7b62a 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
@@ -120,9 +120,8 @@  patternProperties:
         description:
           Positive input can be connected to pins AIN1 to AIN16 by choosing the
           appropriate value from 1 to 16. Negative input is connected to AINCOM.
-        items:
-          minimum: 1
-          maximum: 16
+        minimum: 1
+        maximum: 16
 
     oneOf:
       - required: