From: Guenter Roeck <linux@roeck-us.net>
To: Slawomir Stepien <sst@poczta.fm>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
jdelvare@suse.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, przemyslaw.cencner@nokia.com,
krzysztof.adamski@nokia.com, alexander.sverdlin@nokia.com,
slawomir.stepien@nokia.com
Subject: Re: [PATCH 2/7] dt-bindings: hwmon: Allow specifying channels for lm90
Date: Sun, 5 Jun 2022 10:53:57 -0700 [thread overview]
Message-ID: <20220605175357.GA3150915@roeck-us.net> (raw)
In-Reply-To: <20220525073657.573327-3-sst@poczta.fm>
On Wed, May 25, 2022 at 09:36:52AM +0200, Slawomir Stepien wrote:
> From: Slawomir Stepien <slawomir.stepien@nokia.com>
>
> Add binding description for temperature channels. Currently, support for
> label and temperature-offset-millicelsius is implemented.
>
> Signed-off-by: Slawomir Stepien <slawomir.stepien@nokia.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied to hwmon-next.
Thanks,
Guenter
> ---
> .../bindings/hwmon/national,lm90.yaml | 129 ++++++++++++++++++
> 1 file changed, 129 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
> index 82fce96498c7..e1719839faf0 100644
> --- a/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
> @@ -51,6 +51,12 @@ properties:
> "#thermal-sensor-cells":
> const: 1
>
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> vcc-supply:
> description: phandle to the regulator that provides the +VCC supply
>
> @@ -62,6 +68,29 @@ required:
> - compatible
> - reg
>
> +patternProperties:
> + "^channel@([0-2])$":
> + type: object
> + description: Represents channels of the device and their specific configuration.
> +
> + properties:
> + reg:
> + description: The channel number. 0 is local channel, 1-2 are remote channels.
> + items:
> + minimum: 0
> + maximum: 2
> +
> + label:
> + description: A descriptive name for this channel, like "ambient" or "psu".
> +
> + temperature-offset-millicelsius:
> + description: Temperature offset to be added to or subtracted from remote temperature measurements.
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> allOf:
> - if:
> not:
> @@ -78,6 +107,77 @@ allOf:
> properties:
> ti,extended-range-enable: false
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - dallas,max6646
> + - dallas,max6647
> + - dallas,max6649
> + - dallas,max6657
> + - dallas,max6658
> + - dallas,max6659
> + - dallas,max6695
> + - dallas,max6696
> + then:
> + patternProperties:
> + "^channel@([0-2])$":
> + properties:
> + temperature-offset-millicelsius: false
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - adi,adt7461
> + - adi,adt7461a
> + - adi,adt7481
> + - onnn,nct1008
> + then:
> + patternProperties:
> + "^channel@([0-2])$":
> + properties:
> + temperature-offset-millicelsius:
> + maximum: 127750
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - adi,adm1032
> + - dallas,max6680
> + - dallas,max6681
> + - gmt,g781
> + - national,lm86
> + - national,lm89
> + - national,lm90
> + - national,lm99
> + - nxp,sa56004
> + - winbond,w83l771
> + then:
> + patternProperties:
> + "^channel@([0-2])$":
> + properties:
> + temperature-offset-millicelsius:
> + maximum: 127875
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - ti,tmp451
> + - ti,tmp461
> + then:
> + patternProperties:
> + "^channel@([0-2])$":
> + properties:
> + temperature-offset-millicelsius:
> + maximum: 127937
> +
> additionalProperties: false
>
> examples:
> @@ -96,3 +196,32 @@ examples:
> #thermal-sensor-cells = <1>;
> };
> };
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + sensor@4c {
> + compatible = "adi,adt7481";
> + reg = <0x4c>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@0 {
> + reg = <0x0>;
> + label = "local";
> + };
> +
> + channel@1 {
> + reg = <0x1>;
> + label = "front";
> + temperature-offset-millicelsius = <4000>;
> + };
> +
> + channel@2 {
> + reg = <0x2>;
> + label = "back";
> + temperature-offset-millicelsius = <750>;
> + };
> + };
> + };
next prev parent reply other threads:[~2022-06-05 17:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 7:36 Extend the device-tree binding for lm90 Slawomir Stepien
2022-05-25 7:36 ` [PATCH 1/7] dt-bindings: hwmon: Add compatible string for ADT7481 in lm90 Slawomir Stepien
2022-05-26 1:54 ` Rob Herring
2022-06-05 17:52 ` Guenter Roeck
2022-05-25 7:36 ` [PATCH 2/7] dt-bindings: hwmon: Allow specifying channels for lm90 Slawomir Stepien
2022-05-26 1:55 ` Rob Herring
2022-06-05 17:53 ` Guenter Roeck [this message]
2022-05-25 7:36 ` [PATCH 3/7] hwmon: (lm90) Add compatible entry for adt7481 Slawomir Stepien
2022-06-05 17:54 ` Guenter Roeck
2022-05-25 7:36 ` [PATCH 4/7] hwmon: (lm90) Add support for 2nd remote channel's offset register Slawomir Stepien
2022-06-05 18:03 ` Guenter Roeck
2022-06-06 6:30 ` Slawomir Stepien
2022-06-06 6:50 ` Guenter Roeck
2022-06-06 6:56 ` Slawomir Stepien
2022-06-06 12:14 ` Slawomir Stepien
2022-06-06 14:15 ` Guenter Roeck
2022-05-25 7:36 ` [PATCH 5/7] hwmon: (lm90) Define maximum number of channels that are supported Slawomir Stepien
2022-06-05 18:05 ` Guenter Roeck
2022-05-25 7:36 ` [PATCH 6/7] hwmon: (lm90) Read the channel's label from device-tree Slawomir Stepien
2022-06-05 18:06 ` Guenter Roeck
2022-05-25 7:36 ` [PATCH 7/7] hwmon: (lm90) Read the channel's temperature offset " Slawomir Stepien
2022-06-05 18:10 ` Guenter Roeck
2022-06-06 6:32 ` Slawomir Stepien
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=20220605175357.GA3150915@roeck-us.net \
--to=linux@roeck-us.net \
--cc=alexander.sverdlin@nokia.com \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzysztof.adamski@nokia.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=przemyslaw.cencner@nokia.com \
--cc=robh+dt@kernel.org \
--cc=slawomir.stepien@nokia.com \
--cc=sst@poczta.fm \
/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).