aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2020-03-24 12:05:13 -0600
committerRob Herring <[email protected]>2020-03-31 15:07:48 -0600
commit27f747b12313d0ec1823c68f0ff2a369d77ec2f0 (patch)
treed5dcf0619c3243312281ddf59c2834897ed2f649
parentb9589def9f9af93d9d4c5969c9a6c166f070e36e (diff)
dt-bindings: thermal: tsens: Set 'additionalProperties: false'
Ensure the node only contains the properties listed in the schema by setting 'additionalProperties: false'. Doing this requires reworking the interrupt properties schemas so that they are defined in the main 'properties' section. Fixes: a877e768f655 ("dt-bindings: thermal: tsens: Convert over to a yaml schema") Cc: Andy Gross <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Amit Kucheria <[email protected]> Cc: Zhang Rui <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Amit Kucheria <[email protected]>
-rw-r--r--Documentation/devicetree/bindings/thermal/qcom-tsens.yaml28
1 files changed, 18 insertions, 10 deletions
diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index a4df53228122..a57b76ad7dea 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -47,6 +47,18 @@ properties:
- description: TM registers
- description: SROT registers
+ interrupts:
+ minItems: 1
+ items:
+ - description: Combined interrupt if upper or lower threshold crossed
+ - description: Interrupt if critical threshold crossed
+
+ interrupt-names:
+ minItems: 1
+ items:
+ - const: uplow
+ - const: critical
+
nvmem-cells:
minItems: 1
maxItems: 2
@@ -89,22 +101,16 @@ allOf:
then:
properties:
interrupts:
- items:
- - description: Combined interrupt if upper or lower threshold crossed
+ maxItems: 1
interrupt-names:
- items:
- - const: uplow
+ maxItems: 1
else:
properties:
interrupts:
- items:
- - description: Combined interrupt if upper or lower threshold crossed
- - description: Interrupt if critical threshold crossed
+ minItems: 2
interrupt-names:
- items:
- - const: uplow
- - const: critical
+ minItems: 2
required:
- compatible
@@ -114,6 +120,8 @@ required:
- interrupt-names
- "#thermal-sensor-cells"
+additionalProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>