diff options
author | Marcelo Schmitt <marcelo.schmitt@analog.com> | 2024-07-12 21:21:03 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-29 02:19:52 +0200 |
commit | 320f6693097bf89d67f9cabad24a2b911e23073f (patch) | |
tree | b610bb0441ae4a9271df6686cc53b64714044288 /include | |
parent | spi: Enable controllers to extend the SPI protocol with MOSI idle configuration (diff) | |
download | linux-320f6693097bf89d67f9cabad24a2b911e23073f.tar.xz linux-320f6693097bf89d67f9cabad24a2b911e23073f.zip |
spi: bitbang: Implement support for MOSI idle state configuration
Some SPI peripherals may require strict MOSI line state when the controller
is not clocking out data. Implement support for MOSI idle state
configuration (low or high) by setting the data output line level on
controller setup and after transfers. Bitbang operations now call
controller specific set_mosi_idle() callback to set MOSI to its idle state.
The MOSI line is kept at its idle state if no tx buffer is provided.
Acked-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://patch.msgid.link/de61a600b56ed9cb714d5ea87afa88948e70041e.1720810545.git.marcelo.schmitt@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/spi/spi_bitbang.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index d4cb83195f7a..c92cd43a47f4 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h @@ -24,6 +24,7 @@ struct spi_bitbang { #define BITBANG_CS_ACTIVE 1 /* normally nCS, active low */ #define BITBANG_CS_INACTIVE 0 + void (*set_mosi_idle)(struct spi_device *spi); /* txrx_bufs() may handle dma mapping for transfers that don't * already have one (transfer.{tx,rx}_dma is zero), or use PIO */ |