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
|
@ -214,7 +214,7 @@ static int transceive(const struct device *dev,
|
|||
struct spi_mcux_data *data = dev->data;
|
||||
int ret;
|
||||
|
||||
spi_context_lock(&data->ctx, asynchronous, signal);
|
||||
spi_context_lock(&data->ctx, asynchronous, signal, spi_cfg);
|
||||
|
||||
ret = spi_mcux_configure(dev, spi_cfg);
|
||||
if (ret) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue