[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Nov 2020 16:46:27 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Alexandru Ardelean <alexandru.ardelean@...log.com>
Cc: 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>,
Alexandru Ardelean <ardeleanalex@...il.com>
Subject: Re: [PATCH] spi: Add SPI_NO_TX/RX support
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?
...
> - /* 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?
*/
...
> #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)
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists