diff mbox series

dt-bindings: pinctrl: aspeed: Fix 'compatible' schema errors

Message ID 20190715223725.12924-1-robh@kernel.org
State Accepted
Commit ad21a4ce040cc41b4a085417169b558e86af56b7
Headers show
Series dt-bindings: pinctrl: aspeed: Fix 'compatible' schema errors | expand

Commit Message

Rob Herring (Arm) July 15, 2019, 10:37 p.m. UTC
The Aspeed pinctl schema have errors in the 'compatible' schema:

Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml: \
properties:compatible:enum: ['aspeed', 'ast2400-pinctrl', 'aspeed', 'g4-pinctrl'] has non-unique elements
Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml: \
properties:compatible:enum: ['aspeed', 'ast2500-pinctrl', 'aspeed', 'g5-pinctrl'] has non-unique elements

Flow style sequences have to be quoted if the vales contain ','. Fix
this by using the more common one line per entry formatting.

Fixes: 0a617de16730 ("dt-bindings: pinctrl: aspeed: Convert AST2500 bindings to json-schema")
Fixes: 07457937bb5c ("dt-bindings: pinctrl: aspeed: Convert AST2400 bindings to json-schema")
Cc: Andrew Jeffery <andrew@aj.id.au>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: linux-aspeed@lists.ozlabs.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>

---
 .../devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml   | 4 +++-
 .../devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.20.1

Comments

Joel Stanley July 15, 2019, 11:16 p.m. UTC | #1
On Mon, 15 Jul 2019 at 22:37, Rob Herring <robh@kernel.org> wrote:
>

> The Aspeed pinctl schema have errors in the 'compatible' schema:

>

> Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml: \

> properties:compatible:enum: ['aspeed', 'ast2400-pinctrl', 'aspeed', 'g4-pinctrl'] has non-unique elements

> Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml: \

> properties:compatible:enum: ['aspeed', 'ast2500-pinctrl', 'aspeed', 'g5-pinctrl'] has non-unique elements

>

> Flow style sequences have to be quoted if the vales contain ','. Fix

> this by using the more common one line per entry formatting.


>

>  properties:

>    compatible:

> -    enum: [ aspeed,ast2400-pinctrl, aspeed,g4-pinctrl ]

> +    enum:

> +      - aspeed,ast2400-pinctrl

> +      - aspeed,g4-pinctrl


Thanks for the fix. However, we've standardised on the first form for
all of our device trees, so we can drop the second compatible string
from the bindings.

I think Andrew already has a patch cooking to do this.

Cheers,

Joel
Andrew Jeffery July 16, 2019, 12:37 a.m. UTC | #2
On Tue, 16 Jul 2019, at 08:07, Rob Herring wrote:
> The Aspeed pinctl schema have errors in the 'compatible' schema:

> 

> Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml: \

> properties:compatible:enum: ['aspeed', 'ast2400-pinctrl', 'aspeed', 

> 'g4-pinctrl'] has non-unique elements

> Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml: \

> properties:compatible:enum: ['aspeed', 'ast2500-pinctrl', 'aspeed', 

> 'g5-pinctrl'] has non-unique elements

> 

> Flow style sequences have to be quoted if the vales contain ','. Fix

> this by using the more common one line per entry formatting.

> 

> Fixes: 0a617de16730 ("dt-bindings: pinctrl: aspeed: Convert AST2500 

> bindings to json-schema")

> Fixes: 07457937bb5c ("dt-bindings: pinctrl: aspeed: Convert AST2400 

> bindings to json-schema")

> Cc: Andrew Jeffery <andrew@aj.id.au>

> Cc: Linus Walleij <linus.walleij@linaro.org>

> Cc: Joel Stanley <joel@jms.id.au>

> Cc: linux-aspeed@lists.ozlabs.org

> Cc: linux-gpio@vger.kernel.org

> Cc: linux-arm-kernel@lists.infradead.org

> Signed-off-by: Rob Herring <robh@kernel.org>


Acked-by: Andrew Jeffery <andrew@aj.id.au>


> ---

>  .../devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml   | 4 +++-

>  .../devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml   | 4 +++-

>  2 files changed, 6 insertions(+), 2 deletions(-)

> 

> diff --git 

> a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml 

> b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml

> index 61a110a7db8a..125599a2dc5e 100644

> --- 

> a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml

> +++ 

> b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml

> @@ -22,7 +22,9 @@ description: |+

>  

>  properties:

>    compatible:

> -    enum: [ aspeed,ast2400-pinctrl, aspeed,g4-pinctrl ]

> +    enum:

> +      - aspeed,ast2400-pinctrl

> +      - aspeed,g4-pinctrl

>  

>  patternProperties:

>    '^.*$':

> diff --git 

> a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml 

> b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml

> index cf561bd55128..a464cfa0cba3 100644

> --- 

> a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml

> +++ 

> b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml

> @@ -22,7 +22,9 @@ description: |+

>  

>  properties:

>    compatible:

> -    enum: [ aspeed,ast2500-pinctrl, aspeed,g5-pinctrl ]

> +    enum:

> +      - aspeed,ast2500-pinctrl

> +      - aspeed,g5-pinctrl

>    aspeed,external-nodes:

>      minItems: 2

>      maxItems: 2

> -- 

> 2.20.1

> 

>
Andrew Jeffery July 16, 2019, 12:39 a.m. UTC | #3
On Tue, 16 Jul 2019, at 08:47, Joel Stanley wrote:
> On Mon, 15 Jul 2019 at 22:37, Rob Herring <robh@kernel.org> wrote:

> >

> > The Aspeed pinctl schema have errors in the 'compatible' schema:

> >

> > Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml: \

> > properties:compatible:enum: ['aspeed', 'ast2400-pinctrl', 'aspeed', 'g4-pinctrl'] has non-unique elements

> > Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml: \

> > properties:compatible:enum: ['aspeed', 'ast2500-pinctrl', 'aspeed', 'g5-pinctrl'] has non-unique elements

> >

> > Flow style sequences have to be quoted if the vales contain ','. Fix

> > this by using the more common one line per entry formatting.

> 

> >

> >  properties:

> >    compatible:

> > -    enum: [ aspeed,ast2400-pinctrl, aspeed,g4-pinctrl ]

> > +    enum:

> > +      - aspeed,ast2400-pinctrl

> > +      - aspeed,g4-pinctrl

> 

> Thanks for the fix. However, we've standardised on the first form for

> all of our device trees, so we can drop the second compatible string

> from the bindings.

> 

> I think Andrew already has a patch cooking to do this.


Yes, I have a series in the works. Will send patches soon.

Andrew
Rob Herring (Arm) July 16, 2019, 3:04 p.m. UTC | #4
On Mon, Jul 15, 2019 at 5:17 PM Joel Stanley <joel@jms.id.au> wrote:
>

> On Mon, 15 Jul 2019 at 22:37, Rob Herring <robh@kernel.org> wrote:

> >

> > The Aspeed pinctl schema have errors in the 'compatible' schema:

> >

> > Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml: \

> > properties:compatible:enum: ['aspeed', 'ast2400-pinctrl', 'aspeed', 'g4-pinctrl'] has non-unique elements

> > Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml: \

> > properties:compatible:enum: ['aspeed', 'ast2500-pinctrl', 'aspeed', 'g5-pinctrl'] has non-unique elements

> >

> > Flow style sequences have to be quoted if the vales contain ','. Fix

> > this by using the more common one line per entry formatting.

>

> >

> >  properties:

> >    compatible:

> > -    enum: [ aspeed,ast2400-pinctrl, aspeed,g4-pinctrl ]

> > +    enum:

> > +      - aspeed,ast2400-pinctrl

> > +      - aspeed,g4-pinctrl

>

> Thanks for the fix. However, we've standardised on the first form for

> all of our device trees, so we can drop the second compatible string

> from the bindings.


Doing that would introduce validation warnings until the dts file is
updated. So we still need this change until that happens.

Rob
Andrew Jeffery July 17, 2019, 3:51 a.m. UTC | #5
On Wed, 17 Jul 2019, at 00:35, Rob Herring wrote:
> On Mon, Jul 15, 2019 at 5:17 PM Joel Stanley <joel@jms.id.au> wrote:

> >

> > On Mon, 15 Jul 2019 at 22:37, Rob Herring <robh@kernel.org> wrote:

> > >

> > > The Aspeed pinctl schema have errors in the 'compatible' schema:

> > >

> > > Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml: \

> > > properties:compatible:enum: ['aspeed', 'ast2400-pinctrl', 'aspeed', 'g4-pinctrl'] has non-unique elements

> > > Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml: \

> > > properties:compatible:enum: ['aspeed', 'ast2500-pinctrl', 'aspeed', 'g5-pinctrl'] has non-unique elements

> > >

> > > Flow style sequences have to be quoted if the vales contain ','. Fix

> > > this by using the more common one line per entry formatting.

> >

> > >

> > >  properties:

> > >    compatible:

> > > -    enum: [ aspeed,ast2400-pinctrl, aspeed,g4-pinctrl ]

> > > +    enum:

> > > +      - aspeed,ast2400-pinctrl

> > > +      - aspeed,g4-pinctrl

> >

> > Thanks for the fix. However, we've standardised on the first form for

> > all of our device trees, so we can drop the second compatible string

> > from the bindings.

> 

> Doing that would introduce validation warnings until the dts file is

> updated. So we still need this change until that happens.


My series takes care of that.

Andrew
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
index 61a110a7db8a..125599a2dc5e 100644
--- a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
@@ -22,7 +22,9 @@  description: |+
 
 properties:
   compatible:
-    enum: [ aspeed,ast2400-pinctrl, aspeed,g4-pinctrl ]
+    enum:
+      - aspeed,ast2400-pinctrl
+      - aspeed,g4-pinctrl
 
 patternProperties:
   '^.*$':
diff --git a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
index cf561bd55128..a464cfa0cba3 100644
--- a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
@@ -22,7 +22,9 @@  description: |+
 
 properties:
   compatible:
-    enum: [ aspeed,ast2500-pinctrl, aspeed,g5-pinctrl ]
+    enum:
+      - aspeed,ast2500-pinctrl
+      - aspeed,g5-pinctrl
   aspeed,external-nodes:
     minItems: 2
     maxItems: 2