[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMknhBE7r7aRYA5Sm6UhC3pNBMhAvcB4+ZbRZcsRp=PxTG_2Kg@mail.gmail.com>
Date: Tue, 27 Feb 2024 13:15:33 -0600
From: David Lechner <dlechner@...libre.com>
To: Rob Herring <robh@...nel.org>
Cc: linux-iio@...r.kernel.org,
Michael Hennerich <Michael.Hennerich@...log.com>, Jonathan Cameron <jic23@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Nuno Sá <nuno.sa@...log.com>,
Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: iio: adc: add ad7944 ADCs
On Thu, Feb 22, 2024 at 9:34 AM Rob Herring <robh@...nel.org> wrote:
>
> On Wed, Feb 21, 2024 at 8:44 AM David Lechner <dlechner@...libre.com> wrote:
> >
> > On Wed, Feb 21, 2024 at 9:22 AM Rob Herring <robh@...nel.org> wrote:
> > >
> > > On Fri, Feb 16, 2024 at 01:46:18PM -0600, David Lechner wrote:
> >
> > ...
> >
> > > > + adi,spi-mode:
> > > > + $ref: /schemas/types.yaml#/definitions/string
> > > > + enum: [ single, multi, chain ]
> > > > + default: multi
> > > > + description: |
> > > > + * single: The datasheet calls this "3-wire mode". It is often used when
> > > > + the ADC is the only device on the bus. In this mode, SDI is tied to VIO,
> > > > + and the CNV line can be connected to the CS line of the SPI controller
> > > > + or to a GPIO, in which case the CS line of the controller is unused.
> > >
> > > We have a standard property for this.
> >
> > As discussed in v1 [1], the datasheet's definition of "3-wire mode" is
> > _not_ the same as the standard spi-3wire property. I can add that to
> > the description here to clarify (I hoped changing the enum name was
> > enough, but perhaps not). Or is there a different property you are
> > referring to?
> >
> > [1]: https://lore.kernel.org/all/20240216140826.58b3318d@jic23-huawei/
> >
> > >
> > > > + * multi: The datasheet calls this "4-wire mode". This is the convential
>
> Also, typo.
>
> > > > + SPI mode used when there are multiple devices on the same bus. In this
> > > > + mode, the CNV line is used to initiate the conversion and the SDI line
> > > > + is connected to CS on the SPI controller.
> > >
> > > That's "normal" mode.
> >
> > That was my first choice, but the datasheet uses the term "normal
> > mode" to mean not TURBO mode which is something else unrelated to the
> > SPI mode.
>
> What I mean is this should be conveyed by the absence of any property.
> You don't need a property for "normal SPI mode".
The binding already has `default: multi` to cover this case. But I
suppose we can just leave out the option altogether if you prefer.
Powered by blists - more mailing lists