regulator: dt-bindings: Fix building error for dt_binding_check
diff mbox series

Message ID 1568815340-30401-1-git-send-email-pragnesh.patel@sifive.com
State Changes Requested
Headers show
Series
  • regulator: dt-bindings: Fix building error for dt_binding_check
Related show

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Pragnesh Patel Sept. 18, 2019, 2:02 p.m. UTC
Compatible property is not of type 'string' so replace enum
with items.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
---
 Documentation/devicetree/bindings/regulator/fixed-regulator.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rob Herring Sept. 18, 2019, 2:27 p.m. UTC | #1
On Wed, Sep 18, 2019 at 9:02 AM Pragnesh Patel
<pragnesh.patel@sifive.com> wrote:
>

The subject could be more specific rather than being one that applies
to any dt_binding_check breakage in regulators.

> Compatible property is not of type 'string' so replace enum
> with items.
>
> Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
> ---
>  Documentation/devicetree/bindings/regulator/fixed-regulator.yaml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
> index a78150c..8d4a7b2 100644
> --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
> @@ -29,7 +29,7 @@ if:
>
>  properties:
>    compatible:
> -    enum:
> +    items:
>        - const: regulator-fixed
>        - const: regulator-fixed-clock

This means you expect: compatible = "regulator-fixed", "regulator-fixed-clock";

Did you actually run 'dt_binding_check' because it should fail on the example?

I gave you exact change to make. Just remove 'const: ' on each entry.

Rob
Pragnesh Patel Sept. 18, 2019, 6:24 p.m. UTC | #2
On Wed, Sep 18, 2019 at 7:58 PM Rob Herring <robh+dt@kernel.org> wrote:
>
> On Wed, Sep 18, 2019 at 9:02 AM Pragnesh Patel
> <pragnesh.patel@sifive.com> wrote:
> >
>
> The subject could be more specific rather than being one that applies
> to any dt_binding_check breakage in regulators.
>

Thanks for pointing me out, I will take care this in future patches.

> > Compatible property is not of type 'string' so replace enum
> > with items.
> >
> > Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
> > ---
> >  Documentation/devicetree/bindings/regulator/fixed-regulator.yaml | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
> > index a78150c..8d4a7b2 100644
> > --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
> > +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
> > @@ -29,7 +29,7 @@ if:
> >
> >  properties:
> >    compatible:
> > -    enum:
> > +    items:
> >        - const: regulator-fixed
> >        - const: regulator-fixed-clock
>
> This means you expect: compatible = "regulator-fixed", "regulator-fixed-clock";
>
> Did you actually run 'dt_binding_check' because it should fail on the example?
>
> I gave you exact change to make. Just remove 'const: ' on each entry.

Thanks for correcting me, i rechecked "make dt_binding_check" and it's failed.
I will send the patch again with the updated subject line.

>
> Rob

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
index a78150c..8d4a7b2 100644
--- a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
@@ -29,7 +29,7 @@  if:
 
 properties:
   compatible:
-    enum:
+    items:
       - const: regulator-fixed
       - const: regulator-fixed-clock