diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-04-22 20:35:15 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-04-23 15:48:18 +0100 |
commit | 988f259b46646934003ff8ae4966f7233691d1ad (patch) | |
tree | 8065f35dce6e5c4fd910a03916625c8b74083ccd /drivers/spi/internals.h | |
parent | 46336966bf0852d76f76c1292c057635b05dbb1b (diff) | |
download | linux-stable-988f259b46646934003ff8ae4966f7233691d1ad.tar.gz linux-stable-988f259b46646934003ff8ae4966f7233691d1ad.tar.bz2 linux-stable-988f259b46646934003ff8ae4966f7233691d1ad.zip |
spi: Add an helper to flush the message queue
This is needed by the spi-mem logic to force all messages that have been
queued before a memory operation to be sent before we start the memory
operation. We do that in order to guarantee that spi-mem operations do
not preempt regular SPI transfers.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/internals.h')
-rw-r--r-- | drivers/spi/internals.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/internals.h b/drivers/spi/internals.h index dbe56c77b464..4a28a8395552 100644 --- a/drivers/spi/internals.h +++ b/drivers/spi/internals.h @@ -17,6 +17,8 @@ #include <linux/scatterlist.h> #include <linux/spi/spi.h> +void spi_flush_queue(struct spi_controller *ctrl); + #ifdef CONFIG_HAS_DMA int spi_map_buf(struct spi_controller *ctlr, struct device *dev, struct sg_table *sgt, void *buf, size_t len, |