summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThor Thayer <tthayer@opensource.altera.com>2016-10-10 09:25:24 -0500
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2019-04-30 20:01:56 +0200
commit51fdc026c6fecf81c8a85edef4e954a05e67b5c8 (patch)
tree2a8d78084968ed401201aaf95fd3d5c0ba1b23e3 /include
parent05a78cee0beea6ab8d90058fc65cf2af3bbf4a6b (diff)
spi: Add Flag to Enable Slave Select with GPIO Chip Select.
Some SPI masters require slave selection before the transfer can begin [1]. The SPI framework currently selects the chip using either 1) the internal CS mechanism or 2) the GPIO CS, but not both. This patch adds a new master->flags define to indicate both the GPIO CS and the internal chip select mechanism should be used. Tested On: Altera CycloneV development kit Compile tested for build errors on x86_64 (allyesconfigs) [1] DesignWare dw_apb_ssi Databook, Version 3.20a (page 39) Signed-off-by: Thor Thayer <tthayer@opensource.altera.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/spi/spi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index cce80e6dc7d1..8bee6e2f0b57 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -424,6 +424,7 @@ struct spi_master {
#define SPI_MASTER_NO_TX BIT(2) /* can't do buffer write */
#define SPI_MASTER_MUST_RX BIT(3) /* requires rx */
#define SPI_MASTER_MUST_TX BIT(4) /* requires tx */
+#define SPI_MASTER_GPIO_SS BIT(5) /* GPIO CS must select slave */
/* lock and mutex for SPI bus locking */
spinlock_t bus_lock_spinlock;