From: Conor Dooley <conor@kernel.org>
To: Flaviu Nistor <flaviu.nistor@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
Jean Delvare <jdelvare@suse.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: hwmon: national,lm90: Fix channel constraints for temperature offset
Date: Thu, 27 Aug 2026 18:01:28 +0100 [thread overview]
Message-ID: <20260827-stooge-polish-b23739e44224@spud> (raw)
In-Reply-To: <20260826184750.4798-2-flaviu.nistor@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2950 bytes --]
On Wed, Aug 26, 2026 at 09:47:48PM +0300, Flaviu Nistor wrote:
> 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>
> ---
> Changes in v2:
> - Use else statement in if/then block as suggested by Conor Dooley.
> - Link to v1: https://lore.kernel.org/all/20260824183900.8983-2-flaviu.nistor@gmail.com/
>
> .../bindings/hwmon/national,lm90.yaml | 28 +++++++++++++++++--
> 1 file 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
> @@ -113,6 +113,23 @@ allOf:
> properties:
> 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]
Is this needed? If channel@2 is false, then you won't be able to get to
this point to begin with, right?
Conor.
> + "channel@2": false
> +
> - if:
> properties:
> compatible:
> @@ -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
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-08-27 17:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 18:47 [PATCH v2 0/2] hwmon: lm90: Fix DT channel constraints and reject unsupported channel 2 Flaviu Nistor
2026-08-26 18:47 ` [PATCH v2 1/2] dt-bindings: hwmon: national,lm90: Fix channel constraints for temperature offset Flaviu Nistor
2026-08-26 18:59 ` sashiko-bot
2026-08-27 17:01 ` Conor Dooley [this message]
2026-08-27 17:22 ` Conor Dooley
2026-08-26 18:47 ` [PATCH v2 2/2] hwmon: (lm90) Reject channel 2 on chips with only one remote sensor Flaviu Nistor
2026-08-26 18:57 ` sashiko-bot
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=20260827-stooge-polish-b23739e44224@spud \
--to=conor@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=flaviu.nistor@gmail.com \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox