spi: fix locking for SPI_LOCK_ON using synchronous API
Keep locking for SPI_LOCK_ON from the first call of transceive until spi_release release the lock. Use owner parameter to in the spi_context to store the owner of the lock. The locking is in line with the SPI_HOLD_ON_CS Signed-off-by: Stefan Bigler <stefan@bigler.io>
This commit is contained in:
parent
638b5f389f
commit
596cad8231
17 changed files with 35 additions and 20 deletions
|
@ -146,7 +146,7 @@ static int spi_cc13xx_cc26xx_transceive(const struct device *dev,
|
|||
uint32_t txd, rxd;
|
||||
int err;
|
||||
|
||||
spi_context_lock(ctx, false, NULL);
|
||||
spi_context_lock(ctx, false, NULL, config);
|
||||
|
||||
#if defined(CONFIG_SYS_POWER_MANAGEMENT) && \
|
||||
defined(CONFIG_SYS_POWER_SLEEP_STATES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue