lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 11 Nov 2020 16:54:08 +0200
From:   Alexandru Ardelean <ardeleanalex@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Alexandru Ardelean <alexandru.ardelean@...log.com>,
        linux-spi <linux-spi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>,
        "Bogdan, Dragos" <dragos.bogdan@...log.com>
Subject: Re: [PATCH] spi: Add SPI_NO_TX/RX support

On Wed, Nov 11, 2020 at 4:45 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Wed, Nov 11, 2020 at 4:13 PM Alexandru Ardelean
> <alexandru.ardelean@...log.com> wrote:
> >
> > From: Dragos Bogdan <dragos.bogdan@...log.com>
> >
> > 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ