Skip to contentSkip to conversation

dt-bindings: timer: Add missing (unevaluated|additional)Properties on child nodes

PATCH Applied Rob Herring 2 participants 3 messages Aug 23, 2022 – Aug 31, 2022

Subsystems (2)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: timer: Add missing (unevaluated|additional)Properties on child nodes

In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically).

---
 .../devicetree/bindings/timer/arm,arch_timer_mmio.yaml        | 1 +
 Documentation/devicetree/bindings/timer/ingenic,tcu.yaml      | 4 ++++
 2 files changed, 5 insertions(+)
Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml +1 -0
index cd2176cad53a..f6efa48c4256 100644
@@ -62,6 +62,7 @@ properties:
 patternProperties:
   '^frame@[0-9a-z]*$':
     type: object
+    additionalProperties: false
     description: A timer node has up to 8 frame sub-nodes, each with the following properties.
     properties:
       frame-number:
Documentation/devicetree/bindings/timer/ingenic,tcu.yaml +4 -0
index 0a01e4f5eddb..a84fef0fe628 100644
@@ -114,6 +114,8 @@ patternProperties:
   "^watchdog@[a-f0-9]+$":
     type: object
     $ref: /schemas/watchdog/watchdog.yaml#
+    unevaluatedProperties: false
+
     properties:
       compatible:
         oneOf:
@@ -146,6 +148,8 @@ patternProperties:
   "^pwm@[a-f0-9]+$":
     type: object
     $ref: /schemas/pwm/pwm.yaml#
+    unevaluatedProperties: false
+
     properties:
       compatible:
         oneOf:
Signature · 1 line
2.34.1
author maintainer Applied
#2 lore raw
In reply to Rob Herring
Quoted 10 lines · Rob Herring

In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically).

---
 .../devicetree/bindings/timer/arm,arch_timer_mmio.yaml        | 1 +
 Documentation/devicetree/bindings/timer/ingenic,tcu.yaml      | 4 ++++
 2 files changed, 5 insertions(+)

Applied, thanks!