diff mbox series

[v3] dt-bindings: clk: versaclock5: Miscellaneous fixes and improvements:

Message ID 20210126163955.1933893-1-geert+renesas@glider.be (mailing list archive)
State Under Review
Delegated to: Geert Uytterhoeven
Headers show
Series [v3] dt-bindings: clk: versaclock5: Miscellaneous fixes and improvements: | expand

Commit Message

Geert Uytterhoeven Jan. 26, 2021, 4:39 p.m. UTC
- Remove unneeded reference for "idt,slew-percent", as vendor specific
    properties having a standard unit suffix don't need a type,
  - Add missing "additionalProperties: false" for subnodes, to catch
    typos in properties,
  - Fix property names in example.

Fixes: 45c940184b501fc6 ("dt-bindings: clk: versaclock5: convert to yaml")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This depends on "[PATCH dt-schema 0/2] dt-schema: Add percentage"
https://lore.kernel.org/r/20210126162756.1932692-1-geert+renesas@glider.be

v3:
  - Drop references for "idt,voltage-microvolt" and "idt,slew-percent",

v2:
  - Settle on "idt,voltage-microvolt", cfr. commit 4b003f5fcadfa2d0
    ('clk: vc5: Use "idt,voltage-microvolt" instead of
    "idt,voltage-microvolts"'),
  - Drop reference to clock.yaml, which is already applied
    unconditionally,
  - Drop removal of allOf around if condition, as it is unnecessary
    churn.
---
 .../devicetree/bindings/clock/idt,versaclock5.yaml       | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Rob Herring Jan. 27, 2021, 2 p.m. UTC | #1
On Tue, 26 Jan 2021 17:39:55 +0100, Geert Uytterhoeven wrote:
>   - Remove unneeded reference for "idt,slew-percent", as vendor specific
>     properties having a standard unit suffix don't need a type,
>   - Add missing "additionalProperties: false" for subnodes, to catch
>     typos in properties,
>   - Fix property names in example.
> 
> Fixes: 45c940184b501fc6 ("dt-bindings: clk: versaclock5: convert to yaml")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> This depends on "[PATCH dt-schema 0/2] dt-schema: Add percentage"
> https://lore.kernel.org/r/20210126162756.1932692-1-geert+renesas@glider.be
> 
> v3:
>   - Drop references for "idt,voltage-microvolt" and "idt,slew-percent",
> 
> v2:
>   - Settle on "idt,voltage-microvolt", cfr. commit 4b003f5fcadfa2d0
>     ('clk: vc5: Use "idt,voltage-microvolt" instead of
>     "idt,voltage-microvolts"'),
>   - Drop reference to clock.yaml, which is already applied
>     unconditionally,
>   - Drop removal of allOf around if condition, as it is unnecessary
>     churn.
> ---
>  .../devicetree/bindings/clock/idt,versaclock5.yaml       | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml: patternProperties:^OUT[1-4]$:properties:idt,slew-percent: 'oneOf' conditional failed, one must be fixed:
	'type' is a required property
	Additional properties are not allowed ('enum' was unexpected)
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml: patternProperties:^OUT[1-4]$:properties:idt,slew-percent: 'oneOf' conditional failed, one must be fixed:
		'$ref' is a required property
		'allOf' is a required property
	80 is not of type 'string'
	85 is not of type 'string'
	90 is not of type 'string'
	100 is not of type 'string'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml: ignoring, error in schema: patternProperties: ^OUT[1-4]$: properties: idt,slew-percent
warning: no schema found in file: ./Documentation/devicetree/bindings/clock/idt,versaclock5.yaml

See https://patchwork.ozlabs.org/patch/1432164

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Geert Uytterhoeven Jan. 27, 2021, 2:23 p.m. UTC | #2
Hi Rob,

On Wed, Jan 27, 2021 at 3:00 PM Rob Herring <robh@kernel.org> wrote:
> On Tue, 26 Jan 2021 17:39:55 +0100, Geert Uytterhoeven wrote:
> >   - Remove unneeded reference for "idt,slew-percent", as vendor specific
> >     properties having a standard unit suffix don't need a type,
> >   - Add missing "additionalProperties: false" for subnodes, to catch
> >     typos in properties,
> >   - Fix property names in example.
> >
> > Fixes: 45c940184b501fc6 ("dt-bindings: clk: versaclock5: convert to yaml")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > This depends on "[PATCH dt-schema 0/2] dt-schema: Add percentage"
> > https://lore.kernel.org/r/20210126162756.1932692-1-geert+renesas@glider.be

>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml: patternProperties:^OUT[1-4]$:properties:idt,slew-percent: 'oneOf' conditional failed, one must be fixed:
>         'type' is a required property
>         Additional properties are not allowed ('enum' was unexpected)
>         /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml: patternProperties:^OUT[1-4]$:properties:idt,slew-percent: 'oneOf' conditional failed, one must be fixed:
>                 '$ref' is a required property
>                 'allOf' is a required property
>         80 is not of type 'string'
>         85 is not of type 'string'
>         90 is not of type 'string'
>         100 is not of type 'string'
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml: ignoring, error in schema: patternProperties: ^OUT[1-4]$: properties: idt,slew-percent
> warning: no schema found in file: ./Documentation/devicetree/bindings/clock/idt,versaclock5.yaml

Yep, your bot didn't take into account the dependencies mentioned above ;-)

Gr{oetje,eeting}s,

                        Geert
Luca Ceresoli Jan. 27, 2021, 2:36 p.m. UTC | #3
Hi Geert,

On 26/01/21 17:39, Geert Uytterhoeven wrote:
>   - Remove unneeded reference for "idt,slew-percent", as vendor specific
>     properties having a standard unit suffix don't need a type,
>   - Add missing "additionalProperties: false" for subnodes, to catch
>     typos in properties,
>   - Fix property names in example.
> 
> Fixes: 45c940184b501fc6 ("dt-bindings: clk: versaclock5: convert to yaml")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> This depends on "[PATCH dt-schema 0/2] dt-schema: Add percentage"
> https://lore.kernel.org/r/20210126162756.1932692-1-geert+renesas@glider.be

Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Rob Herring Feb. 4, 2021, 3:57 p.m. UTC | #4
On Tue, 26 Jan 2021 17:39:55 +0100, Geert Uytterhoeven wrote:
>   - Remove unneeded reference for "idt,slew-percent", as vendor specific
>     properties having a standard unit suffix don't need a type,
>   - Add missing "additionalProperties: false" for subnodes, to catch
>     typos in properties,
>   - Fix property names in example.
> 
> Fixes: 45c940184b501fc6 ("dt-bindings: clk: versaclock5: convert to yaml")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> This depends on "[PATCH dt-schema 0/2] dt-schema: Add percentage"
> https://lore.kernel.org/r/20210126162756.1932692-1-geert+renesas@glider.be
> 
> v3:
>   - Drop references for "idt,voltage-microvolt" and "idt,slew-percent",
> 
> v2:
>   - Settle on "idt,voltage-microvolt", cfr. commit 4b003f5fcadfa2d0
>     ('clk: vc5: Use "idt,voltage-microvolt" instead of
>     "idt,voltage-microvolts"'),
>   - Drop reference to clock.yaml, which is already applied
>     unconditionally,
>   - Drop removal of allOf around if condition, as it is unnecessary
>     churn.
> ---
>  .../devicetree/bindings/clock/idt,versaclock5.yaml       | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Stephen Boyd Feb. 5, 2021, 3:25 a.m. UTC | #5
Quoting Geert Uytterhoeven (2021-01-26 08:39:55)
>   - Remove unneeded reference for "idt,slew-percent", as vendor specific
>     properties having a standard unit suffix don't need a type,
>   - Add missing "additionalProperties: false" for subnodes, to catch
>     typos in properties,
>   - Fix property names in example.
> 
> Fixes: 45c940184b501fc6 ("dt-bindings: clk: versaclock5: convert to yaml")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
index 2ac1131fd9222a86..116ecce758bc22cf 100644
--- a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
+++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
@@ -78,9 +78,10 @@  patternProperties:
         enum: [ 1800000, 2500000, 3300000 ]
       idt,slew-percent:
         description: The Slew rate control for CMOS single-ended.
-        $ref: /schemas/types.yaml#/definitions/uint32
         enum: [ 80, 85, 90, 100 ]
 
+    additionalProperties: false
+
 required:
   - compatible
   - reg
@@ -135,13 +136,13 @@  examples:
             clock-names = "xin";
 
             OUT1 {
-                idt,drive-mode = <VC5_CMOSD>;
-                idt,voltage-microvolts = <1800000>;
+                idt,mode = <VC5_CMOSD>;
+                idt,voltage-microvolt = <1800000>;
                 idt,slew-percent = <80>;
             };
 
             OUT4 {
-                idt,drive-mode = <VC5_LVDS>;
+                idt,mode = <VC5_LVDS>;
             };
         };
     };