[PATCH v2 0/4] spi: Add option to keep the MOSI line low, when it is idle

From: Boerge Struempfel
Date: Thu May 11 2023 - 19:14:14 EST


Some spi controller like the imx spi controller switch the mosi line to
high, whenever they are idle. This may not be desired in all use cases.
For example neopixel leds can get confused and flicker due to
misinterpreting the idle state. Therefore, we introduce a new spi-mode
bit, with which the idle behaviour can be overwritten on a per device
basis.

Changes from V1:
- Added patch, introducing the new devicetree binding flag
- Split the generic spi part of the patch from the imx-spi specific
part
- Replaced SPI_CPOL and SPI_CPHA by the combined SPI_MODE_X_MASK bit
in the imx-spi.c modebits.
- Added the SPI_MOSI_IDLE_LOW bit to spidev

Boerge Struempfel (4):
spi: dt-bindings: Introduce spi-mosi-idle-low flag
spi: add SPI_MOSI_IDLE_LOW mode bit
spi: spi-imx: add support for SPI_MOSI_IDLE_LOW mode bit
spi: spidev: add SPI_MOSI_IDLE_LOW mode bit

.../devicetree/bindings/spi/spi-peripheral-props.yaml | 6 ++++++
drivers/spi/spi-imx.c | 9 ++++++++-
drivers/spi/spi.c | 2 ++
drivers/spi/spidev.c | 2 +-
include/uapi/linux/spi/spi.h | 3 ++-
5 files changed, 19 insertions(+), 3 deletions(-)

--
2.25.1