[PATCH v5 0/4] spi: add SPI_MOSI_IDLE_LOW mode bit
Boerge Struempfel
boerge.struempfel at gmail.com
Sat May 20 12:08:51 PDT 2023
Some 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.
---
Link for versions:
v1 and v2: https://lore.kernel.org/linux-spi/20230511135632.78344-1-bstruempfel@ultratronik.de/
v3: https://lore.kernel.org/linux-spi/20230517103007.26287-1-boerge.struempfel@gmail.com/T/#t
v4: https://lore.kernel.org/linux-spi/CAEktqctboF3=ykVNtPsifcmHzF6dWwoEcVh+O4H1u-R=TT6gHg@mail.gmail.com/T/#t
Changes from V4:
- Added the SPI_3WIRE_HIZ mode bit to spidev
- Added the SPI_MOSI_IDLE_LOW mode bit to the spidev_test
userspace tool and added the two other missing spi mode
bits (SPI_3WIRE_HIZ and SPI_RX_CPHA_FLIP) to it as well.
Changes from V3:
- Added missing paranthesis which caused builderrors
Changes from V2:
- Removed the device-tree binding since this should not be managed by
the DT but by the device itself.
- Replaced all occurences of spi->chip_select with the corresponding
macro spi_get_chipselect(spi,0)
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: add SPI_MOSI_IDLE_LOW mode bit
spi: spi-imx: add support for SPI_MOSI_IDLE_LOW mode bit
spi: spidev: add two new spi mode bits
spi: spidev_test Add three missing spi mode bits
drivers/spi/spi-imx.c | 9 +++-
drivers/spi/spidev.c | 3 +-
include/uapi/linux/spi/spi.h | 3 +-
tools/spi/spidev_test.c | 101 ++++++++++++++++++++---------------
4 files changed, 70 insertions(+), 46 deletions(-)
--
2.25.1
More information about the linux-arm-kernel
mailing list