summaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>2018-07-28 10:19:14 +0200
committerMark Brown <broonie@kernel.org>2018-08-01 14:50:28 +0100
commit4b859db2c60692560afbfef1b030d0ddef57b7ee (patch)
tree70a19c5a126a3eacdfda8f8112a13950cdca0a05 /include/linux/spi
parent304d34360b099020a12af2abb7e1ac506f4ba16d (diff)
downloadlinux-stable-4b859db2c60692560afbfef1b030d0ddef57b7ee.tar.gz
linux-stable-4b859db2c60692560afbfef1b030d0ddef57b7ee.tar.bz2
linux-stable-4b859db2c60692560afbfef1b030d0ddef57b7ee.zip
spi: spi-gpio: add SPI_3WIRE support
Add SPI_3WIRE support to spi-gpio controller introducing set_line_direction function pointer in spi_bitbang data structure. Spi-gpio controller has been tested using hts221 temp/rh iio sensor running in 3wire mode and lsm6dsm running in 4wire mode Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi')
-rw-r--r--include/linux/spi/spi_bitbang.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h
index 5847f00ef9cf..b7e021b274dc 100644
--- a/include/linux/spi/spi_bitbang.h
+++ b/include/linux/spi/spi_bitbang.h
@@ -31,6 +31,7 @@ struct spi_bitbang {
u32 (*txrx_word[4])(struct spi_device *spi,
unsigned nsecs,
u32 word, u8 bits, unsigned flags);
+ int (*set_line_direction)(struct spi_device *spi, bool output);
};
/* you can call these default bitbang->master methods from your custom