spi: Add SPI_NO_TX/RX support
authorDragos Bogdan <dragos.bogdan@analog.com>
Mon, 21 Dec 2020 15:29:35 +0000 (17:29 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 28 Dec 2020 14:21:31 +0000 (14:21 +0000)
commitd962608ce2188a1d46ec9d356d6fad5cd6fc0341
treee129ab2ad7f2227640351917584bbf0ebb65da6e
parentf7005142dacea1769fba0152c493aaa61b33205c
spi: Add SPI_NO_TX/RX support

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.

Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201221152936.53873-2-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h
include/uapi/linux/spi/spi.h