Re: [PATCH v2 1/2] dt-bindings: iio: adc: add ad7944 ADCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 22, 2024 at 9:34 AM Rob Herring <robh@xxxxxxxxxx> wrote:
>
> On Wed, Feb 21, 2024 at 8:44 AM David Lechner <dlechner@xxxxxxxxxxxx> wrote:
> >
> > On Wed, Feb 21, 2024 at 9:22 AM Rob Herring <robh@xxxxxxxxxx> 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.





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux