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:
Benjamin Valentin 2019-03-25 13:45:32 +01:00 committed by Kumar Gala
commit 388e9a6223
2 changed files with 4 additions and 14 deletions

View file

@ -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 */

View file

@ -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 */