From 9b56e8ac63943e81a2bd3c5f655069b9a7b6a6c2 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Tue, 12 Sep 2023 13:54:09 +0200 Subject: [PATCH] Revert "drivers/spi: stm32: fix TX-only mode" This reverts commit 31cd3b1f61e914ca23a620033e22ec8d33402369. This change is causing regression in SPI loopback tests. Signed-off-by: Erwan Gouriou --- drivers/spi/spi_ll_stm32.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi_ll_stm32.c b/drivers/spi/spi_ll_stm32.c index 1991bfe6521..948b7641eaf 100644 --- a/drivers/spi/spi_ll_stm32.c +++ b/drivers/spi/spi_ll_stm32.c @@ -324,10 +324,8 @@ static void spi_stm32_shift_m(SPI_TypeDef *spi, struct spi_stm32_data *data) spi_context_update_tx(&data->ctx, 2, 1); } - if (spi_context_rx_buf_on(&data->ctx)) { - while (!ll_func_rx_is_not_empty(spi)) { - /* NOP */ - } + while (!ll_func_rx_is_not_empty(spi)) { + /* NOP */ } if (SPI_WORD_SIZE_GET(data->ctx.config->operation) == 8) {