[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230915-battle-shrouded-9d7e9e3cd6c0@spud>
Date: Fri, 15 Sep 2023 16:58:12 +0100
From: Conor Dooley <conor@...nel.org>
To: "Matyas, Daniel" <Daniel.Matyas@...log.com>
Cc: Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Jonathan Corbet <corbet@....net>,
"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v3 2/5] dt-bindings: hwmon: Add possible new properties
to max31827 bindings
On Fri, Sep 15, 2023 at 03:31:13PM +0000, Matyas, Daniel wrote:
> > -----Original Message-----
> > From: Conor Dooley <conor@...nel.org>
> > On Thu, Sep 14, 2023 at 10:59:45AM +0300, Daniel Matyas wrote:
> > > + adi,alrm-pol:
> >
> > Characters are not at a premium, is there a reason not to use the full
> > words? "flt-q" in particular would be quite cryptic if I saw it in a dts.
> >
> > > + description:
> > > + Sets the alarms active state.
> > > + - 0 = active low
> > > + - 1 = active high
> > > + For max31827 and max31828 the default alarm polarity is low. For
> > max31829
> > > + it is high.
> >
> > This constraint can be expressed in the binding, rather than in free form
> > text like done here. Ditto below.
> Ok, but how? The default values are different depending on the compatible string. I searched for similar examples, but I found nothing...
>
> Some bindings use 'default: ' to declare the default values, but this is the default for every chip.
Something like
allOf:
- if:
properties:
compatible:
contains:
const: adi,max31829
then:
properties:
adi,alrm-pol:
default: 1
else:
properties:
adi,alrm-pol:
default: 0
Cheers,
Conor.
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists