Re: [PATCH v3 10/13] dt-bindings: iio: Add AD7091R-8

From: David Lechner
Date: Fri Dec 08 2023 - 09:50:36 EST


On Fri, Dec 8, 2023 at 7:28 AM Marcelo Schmitt
<marcelo.schmitt1@xxxxxxxxx> wrote:
>
> Hi David, thank you for your suggestions.
> Comments inline.
>
> On 12/07, David Lechner wrote:
> > On Thu, Dec 7, 2023 at 12:42 PM Marcelo Schmitt
> > <marcelo.schmitt@xxxxxxxxxx> wrote:
> > >
> > > Add device tree documentation for AD7091R-8.
> > >
> > > Signed-off-by: Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
> > > ---
> > > .../bindings/iio/adc/adi,ad7091r8.yaml | 99 +++++++++++++++++++
> > > 1 file changed, 99 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7091r8.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7091r8.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7091r8.yaml
> > > new file mode 100644
> > > index 000000000000..02320778f225
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7091r8.yaml
> > > @@ -0,0 +1,99 @@
> > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/iio/adc/adi,ad7091r8.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Analog Devices AD7091R8 8-Channel 12-Bit ADC
> > > +
> > > +maintainers:
> > > + - Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
> > > +
> > > +description: |
> > > + Analog Devices AD7091R-8 8-Channel 12-Bit ADC
> > > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7091R-2_7091R-4_7091R-8.pdf
> > > +
> > > +properties:
> > > + compatible:
> > > + enum:
> > > + - adi,ad7091r2
> > > + - adi,ad7091r4
> > > + - adi,ad7091r8
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> >
> > Missing other supplies? Like vdd-supply and vdrive-supply?
> >
>
> I used the name that would work with ad7091r-base.c.
> If I'm not misinterpreting the datasheet, vdd-supply and vdrive-supply are
> for powering the ADC and setting SPI lanes logic level, respectively.
> They don't have any impact on ADC readings.

The guidelines [1] say that bindings should be complete even if the
feature is not used. In the most recent bindings I have submitted,
Jonathan specifically called out making sure all supplies were
included in the bindings. So I would assume the same applies here.

[1]: https://www.kernel.org/doc/html/latest/devicetree/bindings/writing-bindings.html

> By the way, should maybe I extend ad7091r5 dt doc instead of creating this
> new one?

If it is pin-compatible or 90% the same, then perhaps.