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

Message ID 20191007102552.19808-4-alexandre.torgue@st.com
State Superseded
Headers show
Series
  • Fixes for dt-bindings verification
Related show

Checks

Context Check Description
robh/checkpatch warning "total: 0 errors, 1 warnings, 23 lines checked"

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

Patch
diff mbox series

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