summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2021-06-21 20:53:55 +0300
committerMark Brown <broonie@kernel.org>2021-06-22 14:54:59 +0300
commit0c79378c01999bd60057c475f163ec807c24891f (patch)
tree7a3c43d13c4cdfb0c8a748e3c58f4a762cdeb224 /include
parent476ad3ff8952db3569a77d9ed4a067c5f0f4b733 (diff)
downloadlinux-0c79378c01999bd60057c475f163ec807c24891f.tar.xz
spi: add ancillary device support
Introduce support for ancillary devices, similar to existing implementation for I2C. This is useful for devices having multiple chip-selects, for example some microcontrollers provide a normal SPI interface and a flashing SPI interface. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20210621175359.126729-2-sebastian.reichel@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/spi/spi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index f924160e995f..3ada36175e5f 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -299,6 +299,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
driver_unregister(&sdrv->driver);
}
+extern struct spi_device *spi_new_ancillary_device(struct spi_device *spi, u8 chip_select);
+
/* use a define to avoid include chaining to get THIS_MODULE */
#define spi_register_driver(driver) \
__spi_register_driver(THIS_MODULE, driver)