lkml.org 
[lkml]   [2023]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@kernel.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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-09-15 18:00    [W:0.039 / U:1.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site