Message ID | 20220517135614.8185-1-holger.brunck@hitachienergy.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [v4,1/2] dt-bindings: hwmon: lm90: add ti,extended-range-enable property | expand |
On 17/05/2022 15:56, Holger Brunck wrote: > 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" Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On Tue, May 17, 2022 at 03:56:13PM +0200, Holger Brunck wrote: > 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> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Applied. Thanks, Guenter > --- > 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:
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:
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(+)