[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+GgBR-oER6S3iqJR_T781fT-qxH2awPwdD7ubKxTZsC_RWn0g@mail.gmail.com>
Date: Thu, 5 Sep 2024 11:15:44 +0300
From: Alexandru Ardelean <aardelean@...libre.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, jic23@...nel.org, krzk+dt@...nel.org,
robh@...nel.org, lars@...afoo.de, michael.hennerich@...log.com,
gstols@...libre.com
Subject: Re: [PATCH v3 7/8] dt-bindings: iio: adc: add adi,ad7606c-{16,18}
compatible strings
On Thu, Sep 5, 2024 at 9:39 AM Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> On Wed, Sep 04, 2024 at 10:27:15AM +0300, Alexandru Ardelean wrote:
> > @@ -114,6 +124,45 @@ properties:
> > assumed that the pins are hardwired to VDD.
> > type: boolean
> >
> > +patternProperties:
> > + "^channel@([1-8])$":
>
> Drop ()
>
> > + type: object
> > + $ref: adc.yaml
> > + unevaluatedProperties: false
> > +
> > + properties:
> > + reg:
> > + description:
> > + The channel number, as specified in the datasheet (from 1 to 8).
> > + minimum: 1
> > + maximum: 8
> > +
> > + diff-channels:
> > + description:
> > + Each channel can be configured as a differential bipolar channel.
> > + The ADC uses the same positive and negative inputs for this.
> > + This property must be specified as 'reg' (or the channel number) for
> > + both positive and negative inputs (i.e. diff-channels = <reg reg>).
> > + items:
> > + minimum: 1
> > + maximum: 8
> > +
> > + bipolar:
> > + description:
> > + Each channel can be configured as a unipolar or bipolar single-ended.
> > + When this property is not specified, it's unipolar, so the ADC will
> > + have only the positive input wired.
> > + For this ADC the 'diff-channels' & 'bipolar' properties are mutually
> > + exclusive.
> > +
> > + oneOf:
> > + - required:
> > + - reg
> > + - diff-channels
> > + - required:
> > + - reg
> > + - bipolar
>
> rather:
>
> required:
> - reg
>
> oneOf:
> - required:
> - diff-channels
> - required:
> - bipolar
Ack
>
> > +
> > required:
> > - compatible
> > - reg
> > @@ -170,6 +219,17 @@ allOf:
> > adi,conversion-start-gpios:
> > maxItems: 1
> >
> > + - if:
> > + not:
> > + properties:
> > + compatible:
> > + enum:
> > + - adi,ad7606c-16
> > + - adi,ad7606c-18
> > + then:
> > + patternProperties:
> > + "^channel@[1-8]+$": false
>
>
> You have two different patterns here and in top-level. Please keep one:
> ^channel@[1-8]$
Ah.
Good point.
>
>
> Best regards,
> Krzysztof
>
Powered by blists - more mailing lists