summaryrefslogtreecommitdiff
path: root/include/linux/spi/spi.h
diff options
context:
space:
mode:
authorWilliam Zhang <william.zhang@broadcom.com>2023-02-09 12:02:39 -0800
committerMark Brown <broonie@kernel.org>2023-02-10 21:36:39 +0000
commit6e80133abeb09721ec4601de5b1e68be67135309 (patch)
treeb64dd9f28d3b04f3c263466f0004fd76340f0690 /include/linux/spi/spi.h
parent2ea9b08a661274b9b7b182327bf6ffe29605d671 (diff)
spi: export spi_transfer_cs_change_delay_exec function
For SPI controller that implements transfer_one_message, it needs to insert the delay that required by cs change event between the transfers. Add a wrapper for the local function _spi_transfer_cs_change_delay_exec and export it for SPI controller driver to use. Signed-off-by: William Zhang <william.zhang@broadcom.com> Link: https://lore.kernel.org/r/20230209200246.141520-9-william.zhang@broadcom.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r--include/linux/spi/spi.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 9b23a1d0dd0d..88cb2a1390ce 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -26,6 +26,7 @@ struct spi_controller;
struct spi_transfer;
struct spi_controller_mem_ops;
struct spi_controller_mem_caps;
+struct spi_message;
/*
* INTERFACES between SPI master-side drivers and SPI slave protocol handlers,
@@ -119,6 +120,8 @@ struct spi_delay {
extern int spi_delay_to_ns(struct spi_delay *_delay, struct spi_transfer *xfer);
extern int spi_delay_exec(struct spi_delay *_delay, struct spi_transfer *xfer);
+extern void spi_transfer_cs_change_delay_exec(struct spi_message *msg,
+ struct spi_transfer *xfer);
/**
* struct spi_device - Controller side proxy for an SPI slave device
@@ -283,8 +286,6 @@ static inline void spi_set_csgpiod(struct spi_device *spi, u8 idx, struct gpio_d
spi->cs_gpiod = csgpiod;
}
-struct spi_message;
-
/**
* struct spi_driver - Host side "protocol" driver
* @id_table: List of SPI devices supported by this driver