drivers: spi: sam/sam0: Don't claim support for async transfers
Asyc transceive is currently not implemented for this driver,
so don't claim support.
spi_context_lock() is already being called in spi_sam_transceive()
so calling it in the wrapper function will cause a deadlock.
This reverts eae05d928e
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
This commit is contained in:
parent
521d046fdc
commit
388e9a6223
2 changed files with 4 additions and 14 deletions
|
@ -401,9 +401,6 @@ static int spi_sam_transceive_sync(struct device *dev,
|
|||
const struct spi_buf_set *tx_bufs,
|
||||
const struct spi_buf_set *rx_bufs)
|
||||
{
|
||||
struct spi_sam_data *data = dev->driver_data;
|
||||
|
||||
spi_context_lock(&data->ctx, false, NULL);
|
||||
return spi_sam_transceive(dev, config, tx_bufs, rx_bufs);
|
||||
}
|
||||
|
||||
|
@ -414,10 +411,8 @@ static int spi_sam_transceive_async(struct device *dev,
|
|||
const struct spi_buf_set *rx_bufs,
|
||||
struct k_poll_signal *async)
|
||||
{
|
||||
struct spi_sam_data *data = dev->driver_data;
|
||||
|
||||
spi_context_lock(&data->ctx, true, async);
|
||||
return spi_sam_transceive(dev, config, tx_bufs, rx_bufs);
|
||||
/* TODO: implement asyc transceive */
|
||||
return -ENOTSUP;
|
||||
}
|
||||
#endif /* CONFIG_SPI_ASYNC */
|
||||
|
||||
|
|
|
@ -408,9 +408,6 @@ static int spi_sam0_transceive_sync(struct device *dev,
|
|||
const struct spi_buf_set *tx_bufs,
|
||||
const struct spi_buf_set *rx_bufs)
|
||||
{
|
||||
struct spi_sam0_data *data = dev->driver_data;
|
||||
|
||||
spi_context_lock(&data->ctx, false, NULL);
|
||||
return spi_sam0_transceive(dev, config, tx_bufs, rx_bufs);
|
||||
}
|
||||
|
||||
|
@ -421,10 +418,8 @@ static int spi_sam0_transceive_async(struct device *dev,
|
|||
const struct spi_buf_set *rx_bufs,
|
||||
struct k_poll_signal *async)
|
||||
{
|
||||
struct spi_sam0_data *data = dev->driver_data;
|
||||
|
||||
spi_context_lock(&data->ctx, true, async);
|
||||
return spi_sam0_transceive(dev, config, tx_bufs, rx_bufs);
|
||||
/* TODO: implement asyc transceive */
|
||||
return -ENOTSUP;
|
||||
}
|
||||
#endif /* CONFIG_SPI_ASYNC */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue