diff mbox series

[3/3] dt-bindings: regulator: Fix yaml verification for fixed-regulator schema

Message ID 20191007102552.19808-4-alexandre.torgue@st.com (mailing list archive)
State New, archived
Headers show
Series Fixes for dt-bindings verification | expand

Commit Message

Alexandre TORGUE Oct. 7, 2019, 10:25 a.m. UTC
This commit fixes an issue seen during yaml check ("make dt_binding_check").
Compatible didn't seem to be seen as a string.

Reported issue:
"properties:compatible:enum:0: {'const': 'regulator-fixed'}
is not of type 'string'"
And
"properties:compatible:enum:1: {'const': 'regulator-fixed-clock'}
is not of type 'string'"

Fixes: 9c86d003d620 ("dt-bindings: regulator: add regulator-fixed-clock binding")
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>

Comments

Rob Herring Oct. 7, 2019, 1:08 p.m. UTC | #1
On Mon, Oct 7, 2019 at 5:26 AM Alexandre Torgue <alexandre.torgue@st.com> wrote:
>
> This commit fixes an issue seen during yaml check ("make dt_binding_check").
> Compatible didn't seem to be seen as a string.
>
> Reported issue:
> "properties:compatible:enum:0: {'const': 'regulator-fixed'}
> is not of type 'string'"
> And
> "properties:compatible:enum:1: {'const': 'regulator-fixed-clock'}
> is not of type 'string'"
>
> Fixes: 9c86d003d620 ("dt-bindings: regulator: add regulator-fixed-clock binding")
> Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>

There's already a fix queued up.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
index a78150c47aa2..7725cedf1538 100644
--- a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
@@ -22,16 +22,20 @@  allOf:
 if:
   properties:
     compatible:
+      allOf:
+        - $ref: "/schemas/types.yaml#/definitions/string"
       contains:
-        const: regulator-fixed-clock
+        const: "regulator-fixed-clock"
   required:
     - clocks
 
 properties:
   compatible:
+    allOf:
+      - $ref: "/schemas/types.yaml#/definitions/string"
     enum:
-      - const: regulator-fixed
-      - const: regulator-fixed-clock
+      - "regulator-fixed"
+      - "regulator-fixed-clock"
 
   regulator-name: true