linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: iio: addac: adi,74115: Add missing maxItems
@ 2023-01-15  2:25 Michał Grzelak
  2023-01-17 19:57 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Michał Grzelak @ 2023-01-15  2:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: lars, Michael.Hennerich, cosmin.tanislav, jic23, robh+dt,
	krzysztof.kozlowski+dt, linux-iio, devicetree,
	Michał Grzelak

Running 'make dt_binding_check' gives following warnings:
iio/addac/adi,ad74115.example.dtb:
addac@0: adi,conv2-range-microvolt: 'oneOf' conditional failed, one must
be fixed:
        4282967296 is not one of [-2500000, 0]
        4282967296 is not one of [-12000000, 0]
        -2500000 was expected
        -104000 was expected
        625000 was expected

addac@0: Unevaluated properties are not allowed
('adi,conv2-range-microvolt' was unexpected)
        From schema: iio/addac/adi,ad74115.yaml

As every property with standard suffix has inferred type of array of
cells, adi,conv2-range-microvolt is required by meta-schemas/cell.yaml
to have maxItems >= 2. Fix these errors by setting maxItems to 2.

Signed-off-by: Michał Grzelak <mchl.grzlk@gmail.com>
---
 Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml b/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml
index 72d2e910f206..cdeb04184f5a 100644
--- a/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml
+++ b/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml
@@ -87,6 +87,7 @@ properties:
 
   adi,conv2-range-microvolt:
     description: Conversion range for ADC conversion 2.
+    maxItems: 2
     oneOf:
       - items:
           - enum: [-2500000, 0]
-- 
2.37.3


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

* Re: [PATCH] dt-bindings: iio: addac: adi,74115: Add missing maxItems
  2023-01-15  2:25 [PATCH] dt-bindings: iio: addac: adi,74115: Add missing maxItems Michał Grzelak
@ 2023-01-17 19:57 ` Rob Herring
  2023-01-18 18:11   ` Michał Grzelak
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2023-01-17 19:57 UTC (permalink / raw)
  To: Michał Grzelak
  Cc: linux-kernel, lars, Michael.Hennerich, cosmin.tanislav, jic23,
	krzysztof.kozlowski+dt, linux-iio, devicetree

On Sun, Jan 15, 2023 at 03:25:58AM +0100, Michał Grzelak wrote:
> Running 'make dt_binding_check' gives following warnings:
> iio/addac/adi,ad74115.example.dtb:
> addac@0: adi,conv2-range-microvolt: 'oneOf' conditional failed, one must
> be fixed:
>         4282967296 is not one of [-2500000, 0]
>         4282967296 is not one of [-12000000, 0]
>         -2500000 was expected
>         -104000 was expected
>         625000 was expected
> 
> addac@0: Unevaluated properties are not allowed
> ('adi,conv2-range-microvolt' was unexpected)
>         From schema: iio/addac/adi,ad74115.yaml

I think your dtschema version is out of date. I don't see this issue. 
The issue has to do with signed types and there have been some fixes 
related to them.

> As every property with standard suffix has inferred type of array of
> cells, adi,conv2-range-microvolt is required by meta-schemas/cell.yaml
> to have maxItems >= 2. Fix these errors by setting maxItems to 2.

The meta-schemas have nothing to do with warnings in examples. It's like 
this: meta-schemas check schemas check examples

> 
> Signed-off-by: Michał Grzelak <mchl.grzlk@gmail.com>
> ---
>  Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml b/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml
> index 72d2e910f206..cdeb04184f5a 100644
> --- a/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml
> +++ b/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml
> @@ -87,6 +87,7 @@ properties:
>  
>    adi,conv2-range-microvolt:
>      description: Conversion range for ADC conversion 2.
> +    maxItems: 2
>      oneOf:
>        - items:
>            - enum: [-2500000, 0]
> -- 
> 2.37.3
> 

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

* Re: [PATCH] dt-bindings: iio: addac: adi,74115: Add missing maxItems
  2023-01-17 19:57 ` Rob Herring
@ 2023-01-18 18:11   ` Michał Grzelak
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Grzelak @ 2023-01-18 18:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: Michał Grzelak, linux-kernel, lars, Michael.Hennerich,
	cosmin.tanislav, jic23, krzysztof.kozlowski+dt, linux-iio,
	devicetree

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

On Tue, 17 Jan 2023, Rob Herring wrote:

> On Sun, Jan 15, 2023 at 03:25:58AM +0100, Michał Grzelak wrote:
>> Running 'make dt_binding_check' gives following warnings:
>> iio/addac/adi,ad74115.example.dtb:
>> addac@0: adi,conv2-range-microvolt: 'oneOf' conditional failed, one must
>> be fixed:
>>         4282967296 is not one of [-2500000, 0]
>>         4282967296 is not one of [-12000000, 0]
>>         -2500000 was expected
>>         -104000 was expected
>>         625000 was expected
>>
>> addac@0: Unevaluated properties are not allowed
>> ('adi,conv2-range-microvolt' was unexpected)
>>         From schema: iio/addac/adi,ad74115.yaml
>
> I think your dtschema version is out of date. I don't see this issue.
> The issue has to do with signed types and there have been some fixes
> related to them.
>

Right. Issue vanished after upgrade, sorry for unnecessary noise.

Best regards,
Michał

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

end of thread, other threads:[~2023-01-18 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-15  2:25 [PATCH] dt-bindings: iio: addac: adi,74115: Add missing maxItems Michał Grzelak
2023-01-17 19:57 ` Rob Herring
2023-01-18 18:11   ` Michał Grzelak

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