From: Geert Uytterhoeven <geert+renesas@glider.be>
To: "Zhang Rui" <rui.zhang@intel.com>,
"Daniel Lezcano" <daniel.lezcano@linaro.org>,
"Amit Kucheria" <amit.kucheria@verdurent.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH] dt-bindings: thermal: rcar-thermal: Improve schema validation
Date: Fri, 19 Jun 2020 17:15:41 +0200 [thread overview]
Message-ID: <20200619151541.15069-1-geert+renesas@glider.be> (raw)
- Document missing "#thermal-sensor-cells",
- Factor out common required properties,
- "interrupts", "clocks", and "power-domains" are required on R-Mobile
APE6, too,
- Invert logic to simplify descriptions,
- Add "additionalProperties: false".
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
.../bindings/thermal/rcar-thermal.yaml | 53 ++++++++++++-------
1 file changed, 34 insertions(+), 19 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml b/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml
index 0994693d240f9ff4..88787b98992fe7c9 100644
--- a/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml
@@ -59,25 +59,40 @@ properties:
resets:
maxItems: 1
-if:
- properties:
- compatible:
- contains:
- enum:
- - renesas,thermal-r8a73a4 # R-Mobile APE6
- - renesas,thermal-r8a7779 # R-Car H1
-then:
- required:
- - compatible
- - reg
-else:
- required:
- - compatible
- - reg
- - interrupts
- - clocks
- - power-domains
- - resets
+ '#thermal-sensor-cells':
+ const: 0
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,thermal-r8a73a4 # R-Mobile APE6
+ - renesas,thermal-r8a7779 # R-Car H1
+ then:
+ required:
+ - resets
+ - '#thermal-sensor-cells'
+
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ const: renesas,thermal-r8a7779 # R-Car H1
+ then:
+ required:
+ - interrupts
+ - clocks
+ - power-domains
+
+additionalProperties: false
examples:
# Example (non interrupt support)
--
2.17.1
next reply other threads:[~2020-06-19 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-19 15:15 Geert Uytterhoeven [this message]
2020-06-27 3:44 ` [PATCH] dt-bindings: thermal: rcar-thermal: Improve schema validation Niklas Söderlund
2020-06-29 12:51 ` Amit Kucheria
2020-07-15 19:24 ` 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=20200619151541.15069-1-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=amit.kucheria@verdurent.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
--cc=robh+dt@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).