From 988f259b46646934003ff8ae4966f7233691d1ad Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Sun, 22 Apr 2018 20:35:15 +0200 Subject: 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 Signed-off-by: Mark Brown --- drivers/spi/internals.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/spi/internals.h') 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 #include +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, -- cgit v1.2.3