summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlaviu Nistor <flaviu.nistor@gmail.com>2026-08-26 21:47:48 +0300
committerGuenter Roeck <linux@roeck-us.net>2026-09-02 14:36:38 -0700
commitabb0f9fe447b8cf3a45f69c2e9d69697ef004973 (patch)
treef13ebcfbae1caab3226ac2bb4b5059fffa6b7ad4
parent2548df6c6008d7b91b1c21729f1001815e52f9bb (diff)
downloadlinux-next-abb0f9fe447b8cf3a45f69c2e9d69697ef004973.tar.gz
linux-next-abb0f9fe447b8cf3a45f69c2e9d69697ef004973.zip
dt-bindings: hwmon: national,lm90: Fix channel constraints for temperature offset
Limit temperature-offset-millicelsius to remote channels only, since channel 0 is local and this property does not apply to it. Channel 2 is only valid on devices with two remote sensors, so reject channel 2 for compatibles that do not support a second remote channel. Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20260826184750.4798-2-flaviu.nistor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--Documentation/devicetree/bindings/hwmon/national,lm90.yaml28
1 files changed, 25 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
index 164068ba069d..a8b2a24501b3 100644
--- a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
+++ b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
@@ -114,6 +114,23 @@ allOf:
ti,extended-range-enable: false
- if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,adt7481
+ - dallas,max6695
+ - dallas,max6696
+ then:
+ patternProperties:
+ "^channel@[0-1]$":
+ properties:
+ reg:
+ enum: [0, 1]
+ "channel@2": false
+
+ - if:
properties:
compatible:
contains:
@@ -134,6 +151,11 @@ allOf:
"^channel@([0-2])$":
properties:
temperature-offset-millicelsius: false
+ else:
+ patternProperties:
+ "channel@0":
+ properties:
+ temperature-offset-millicelsius: false
- if:
properties:
@@ -149,7 +171,7 @@ allOf:
- onnn,nct1008
then:
patternProperties:
- "^channel@([0-2])$":
+ "^channel@([1-2])$":
properties:
temperature-offset-millicelsius:
maximum: 127750
@@ -172,7 +194,7 @@ allOf:
- winbond,w83l771
then:
patternProperties:
- "^channel@([0-2])$":
+ "^channel@([1-2])$":
properties:
temperature-offset-millicelsius:
maximum: 127875
@@ -186,7 +208,7 @@ allOf:
- ti,tmp461
then:
patternProperties:
- "^channel@([0-2])$":
+ "^channel@([1-2])$":
properties:
temperature-offset-millicelsius:
maximum: 127937