Re: [PATCH] spi: Add SPI_NO_TX/RX support

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

 



On Wed, Nov 11, 2020 at 4:45 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Wed, Nov 11, 2020 at 4:13 PM Alexandru Ardelean
> <alexandru.ardelean@xxxxxxxxxx> wrote:
> >
> > From: Dragos Bogdan <dragos.bogdan@xxxxxxxxxx>
> >
> > Transmit/receive only is a valid SPI mode. For example, the MOSI/TX line
> > might be missing from an ADC while for a DAC the MISO/RX line may be
> > optional. This patch adds these two new modes: SPI_NO_TX and
> > SPI_NO_RX. This way, the drivers will be able to identify if any of
> > these two lines is missing and to adjust the transfers accordingly.
>
> Shouldn't this update a binding documentation?

oh,
good catch

>
> ...
>
> > -       /* check mode to prevent that DUAL and QUAD set at the same time
> > +       /* check mode to prevent that any two of DUAL, QUAD and NO_MOSI/MISO
> > +        * are set at the same time
> >          */
>
> /*
>  * Perhaps switch to proper multi-line comment style
>  * at the same time?
>  */

¯\_(ツ)_/¯

Not sure what SPI prefers as multi-line comment style,
But ok.

>
> ...
>
> >  #define        SPI_TX_OCTAL    0x2000                  /* transmit with 8 wires */
> >  #define        SPI_RX_OCTAL    0x4000                  /* receive with 8 wires */
> >  #define        SPI_3WIRE_HIZ   0x8000                  /* high impedance turnaround */
> > +#define        SPI_NO_TX       0x10000                 /* no transmit wire */
> > +#define        SPI_NO_RX       0x20000                 /* no receive wire */
>
> Perhaps switch to use BIT() instead at some point (as a prerequisite
> patch, for example)

I'll leave this up to the maintainer preference.
Maybe I'll do it as a second patch here, so that I can be dropped.

>
> --
> With Best Regards,
> Andy Shevchenko




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux