On Thu, Aug 27, 2026 at 06:01:28PM +0100, Conor Dooley wrote: > 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 > > --- > > 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? Hmm, actually keep it. It'd fail dtbs_check but I don't think dt_binding_check fails for channel@0 + reg = <2> Acked-by: Conor Dooley pw-bot: not-applicable > > 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 > >