Skip to contentSkip to conversation

dt-bindings: mfd: twl: Reference converted YAML schemas for subnodes

PATCH Superseded Jihed Chaibi 2 participants 4 messages Mar 25 – Apr 1

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: mfd: twl: Reference converted YAML schemas for subnodes

Now that all TWL subnode bindings (audio, keypad, twl4030-usb, gpio, usb-comparator) have been converted to YAML and merged into mainline, update the parent ti,twl.yaml to properly reference them via $ref.

Previously these subnodes used inline compatible definitions with
additionalProperties: true, which meant properties defined in the subnode schemas were not being validated. Replace them with $ref to the appropriate schemas and unevaluatedProperties: false, matching the pattern already used by the madc, gpadc, and charger subnodes.

---
 .../devicetree/bindings/mfd/ti,twl.yaml       | 50 ++++---------------
 1 file changed, 10 insertions(+), 40 deletions(-)
Documentation/devicetree/bindings/mfd/ti,twl.yaml +10 -40
index 9cc3e4721612..a3af8e717ec7 100644
@@ -265,47 +265,23 @@ properties:
 
   audio:
     type: object
-    additionalProperties: true
-
-    properties:
-      compatible:
-        const: ti,twl4030-audio
-
-    required:
-      - compatible
+    $ref: /schemas/sound/ti,twl4030-audio.yaml
+    unevaluatedProperties: false
 
   keypad:
     type: object
-    additionalProperties: true
-
-    properties:
-      compatible:
-        const: ti,twl4030-keypad
-
-    required:
-      - compatible
+    $ref: /schemas/input/ti,twl4030-keypad.yaml
+    unevaluatedProperties: false
 
   twl4030-usb:
     type: object
-    additionalProperties: true
-
-    properties:
-      compatible:
-        const: ti,twl4030-usb
-
-    required:
-      - compatible
+    $ref: /schemas/usb/ti,twl4030-usb.yaml
+    unevaluatedProperties: false
 
   gpio:
     type: object
-    additionalProperties: true
-
-    properties:
-      compatible:
-        const: ti,twl4030-gpio
-
-    required:
-      - compatible
+    $ref: /schemas/gpio/ti,twl4030-gpio.yaml
+    unevaluatedProperties: false
 
   power:
     type: object
@@ -371,14 +347,8 @@ properties:
 
   usb-comparator:
     type: object
-    additionalProperties: true
-
-    properties:
-      compatible:
-        const: ti,twl6030-usb
-
-    required:
-      - compatible
+    $ref: /schemas/usb/ti,twl6030-usb.yaml
+    unevaluatedProperties: false
 
   pwm:
     type: object
Signature · 1 line
2.47.3
#1 lore raw
Quoted 2 lines · Jihed Chaibi

Now that all TWL subnode bindings (audio, keypad, twl4030-usb, gpio, usb-comparator) have been converted to YAML and merged into mainline,

subject and here: drop YAML. There are no YAML schemas.

Quoted 5 lines

update the parent ti,twl.yaml to properly reference them via $ref.

Previously these subnodes used inline compatible definitions with
additionalProperties: true, which meant properties defined in the subnode schemas were not being validated. Replace them with $ref to the

No, they were validated by their child device schemas. Everything was correct and expected.

Best regards,
Krzysztof

#2 lore raw
Quoted 7 lines · Krzysztof Kozlowski

No, they were validated by their child device schemas. Everything was correct and expected.

Best regards,
Krzysztof

Thanks for the feedback Krzysztof, I have sent a v2 of this patch, please let me know if anything else needs to be done.

Best regards,
Jihed

#3 lore raw
Quoted 11 lines · Jihed Chaibi
Quoted 7 lines · Krzysztof Kozlowski

No, they were validated by their child device schemas. Everything was correct and expected.

Best regards,
Krzysztof

Thanks for the feedback Krzysztof, I have sent a v2 of this patch, please let me know if anything else needs to be done.

Really? On 27th of Match, 40 minutes after I told you NO, you send the same?

Best regards,
Krzysztof