All of lore.kernel.org
 help / color / mirror / Atom feed
From: Holger Brunck <holger.brunck@hitachienergy.com>
To: linux-hwmon@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Holger Brunck <holger.brunck@hitachienergy.com>
Subject: [PATCH v4 1/2] dt-bindings: hwmon: lm90: add ti,extended-range-enable property
Date: Tue, 17 May 2022 15:56:13 +0200	[thread overview]
Message-ID: <20220517135614.8185-1-holger.brunck@hitachienergy.com> (raw)

Some devices can operate in an extended temperature mode.
Therefore add a boolean ti,extended-range-enable to be able to
select this feature in the device tree node. Also make sure that this
feature can only be enabled for the devices supporting this feature.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
---
changes for v4: 
   - use "if:not:then" instead of "if:else"

 .../bindings/hwmon/national,lm90.yaml         | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
index 48b7065798b0..b04657849852 100644
--- a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
+++ b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
@@ -53,10 +53,29 @@ properties:
   vcc-supply:
     description: phandle to the regulator that provides the +VCC supply
 
+  ti,extended-range-enable:
+    description: Set to enable extended range temperature.
+    type: boolean
+
 required:
   - compatible
   - reg
 
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - adi,adt7461
+                - adi,adt7461a
+                - ti,tmp451
+                - ti,tmp461
+    then:
+      properties:
+        ti,extended-range-enable: false
+
 additionalProperties: false
 
 examples:
-- 
2.34.1


             reply	other threads:[~2022-05-17 13:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 13:56 Holger Brunck [this message]
2022-05-17 13:56 ` [PATCH v4 2/2] hwmon: (lm90) enable extended range according to DTS node Holger Brunck
2022-05-17 16:47   ` Guenter Roeck
2022-05-17 14:28 ` [PATCH v4 1/2] dt-bindings: hwmon: lm90: add ti,extended-range-enable property Krzysztof Kozlowski
2022-05-17 16:46 ` Guenter Roeck

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=20220517135614.8185-1-holger.brunck@hitachienergy.com \
    --to=holger.brunck@hitachienergy.com \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.