drivers: spi: stm32: fix bugs in polled mode
In polled mode, the STM32 SPI driver is signaling completion when there are no waiters: - the only spi_context_wait_for_completion() caller in this driver is in the IRQ-driven portion of transceive() itself, which isn't compiled in polled mode. - the "asynchronous completion + polled I/O" combination is not supported by the driver, so there are no other threads polling on this I/O we need to signal completion to. What should be happening instead of signaling completion is releasing the chip select pin, which polled I/O currently doesn't do. Fix these issues. Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This commit is contained in:
parent
7b0f0f801c
commit
a6c481d36d
1 changed files with 1 additions and 1 deletions
|
@ -318,7 +318,7 @@ static int transceive(struct spi_config *config,
|
|||
} while (spi_context_tx_on(&data->ctx) ||
|
||||
spi_context_rx_on(&data->ctx));
|
||||
|
||||
spi_context_complete(&data->ctx, 0);
|
||||
spi_context_cs_control(&data->ctx, false);
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_STM32L4X) || defined(CONFIG_SOC_SERIES_STM32F3X)
|
||||
/* Flush RX buffer */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue