Commit 27f747b1 authored by Rob Herring's avatar Rob Herring

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: a877e768 ("dt-bindings: thermal: tsens: Convert over to a yaml schema")
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Amit Kucheria <amit.kucheria@linaro.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
parent b9589def
...@@ -47,6 +47,18 @@ properties: ...@@ -47,6 +47,18 @@ properties:
- description: TM registers - description: TM registers
- description: SROT 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: nvmem-cells:
minItems: 1 minItems: 1
maxItems: 2 maxItems: 2
...@@ -89,22 +101,16 @@ allOf: ...@@ -89,22 +101,16 @@ allOf:
then: then:
properties: properties:
interrupts: interrupts:
items: maxItems: 1
- description: Combined interrupt if upper or lower threshold crossed
interrupt-names: interrupt-names:
items: maxItems: 1
- const: uplow
else: else:
properties: properties:
interrupts: interrupts:
items: minItems: 2
- description: Combined interrupt if upper or lower threshold crossed
- description: Interrupt if critical threshold crossed
interrupt-names: interrupt-names:
items: minItems: 2
- const: uplow
- const: critical
required: required:
- compatible - compatible
...@@ -114,6 +120,8 @@ required: ...@@ -114,6 +120,8 @@ required:
- interrupt-names - interrupt-names
- "#thermal-sensor-cells" - "#thermal-sensor-cells"
additionalProperties: false
examples: examples:
- | - |
#include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment