From: Rob Herring <robh@kernel.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Amit Kucheria <amit.kucheria@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org
Subject: [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false'
Date: Tue, 24 Mar 2020 12:05:13 -0600 [thread overview]
Message-ID: <20200324180513.3882-2-robh@kernel.org> (raw)
In-Reply-To: <20200324180513.3882-1-robh@kernel.org>
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 <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: Rob Herring <robh@kernel.org>
---
.../bindings/thermal/qcom-tsens.yaml | 28 ++++++++++++-------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index 7a38d2116059..3492447e42e9 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -46,6 +46,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
@@ -88,22 +100,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
@@ -113,6 +119,8 @@ required:
- interrupt-names
- "#thermal-sensor-cells"
+additionalProperties: false
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
--
2.20.1
next prev parent reply other threads:[~2020-03-24 18:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 18:05 [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Rob Herring
2020-03-24 18:05 ` Rob Herring [this message]
2020-03-25 15:44 ` [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false' Amit Kucheria
2020-03-31 21:09 ` Rob Herring
2020-03-25 15:43 ` [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Amit Kucheria
2020-03-31 21:09 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200324180513.3882-2-robh@kernel.org \
--to=robh@kernel.org \
--cc=agross@kernel.org \
--cc=amit.kucheria@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).