summaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
authorThor Thayer <tthayer@opensource.altera.com>2016-10-10 09:25:24 -0500
committerMark Brown <broonie@kernel.org>2016-10-21 12:09:30 +0100
commit8eee6b9dd30d5b20a4c31886057a68bb6a2736c9 (patch)
tree8d10e86d7f5575015b7316619369d75a70b831a6 /include/linux/spi
parent1001354ca34179f3db924eb66672442a173147dc (diff)
downloadlinux-8eee6b9dd30d5b20a4c31886057a68bb6a2736c9.tar.gz
linux-8eee6b9dd30d5b20a4c31886057a68bb6a2736c9.tar.bz2
linux-8eee6b9dd30d5b20a4c31886057a68bb6a2736c9.zip
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/linux/spi')
-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 4b743ac35396..75c6bd0ac605 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -442,6 +442,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 */
/*
* on some hardware transfer / message size may be constrained