]> www.infradead.org Git - users/willy/xarray.git/commit
spi: stm32: make SPI_MASTER_MUST_TX flags only specific to STM32F4
authorAlain Volmat <alain.volmat@foss.st.com>
Wed, 19 Jan 2022 09:32:45 +0000 (10:32 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 19 Jan 2022 16:47:43 +0000 (16:47 +0000)
commit9df15d842a0f77f2b8ee29386f6d714e4220df57
treec29279ce70c41d771a5d0a160d331b6b2ddb2d45
parent3cefddb72f80dc8d49ce605628ceb6525cfd64da
spi: stm32: make SPI_MASTER_MUST_TX flags only specific to STM32F4

Commit 61367d0b8f5e ("spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4")
allowed to properly communicate with the st-gyro-spi even when
there is no tx_buf provided by setting the flag SPI_MASTER_MUST_TX and
thus forcing a dummy TX buffer to work in Full Duplex.
This behavior should kept only for the STM32F4 and not for other
compatible since the STM32H7 do support SIMPLEX_RX and SIMPLEX_TX.
Add the flags variable within the struct stm32_spi_cfg so that flags
used at master registration time are compatible specific.

Fixes: 61367d0b8f5e ("spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/20220119093245.624878-3-alain.volmat@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c