Skip to content

Commit c36ff26

Browse files
Boris Brezillonbroonie
authored andcommitted
spi: Extend the core to ease integration of SPI memory controllers
Some controllers are exposing high-level interfaces to access various kind of SPI memories. Unfortunately they do not fit in the current spi_controller model and usually have drivers placed in drivers/mtd/spi-nor which are only supporting SPI NORs and not SPI memories in general. This is an attempt at defining a SPI memory interface which works for all kinds of SPI memories (NORs, NANDs, SRAMs). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@exceet.de> Tested-by: Frieder Schrempf <frieder.schrempf@exceet.de> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 055ed0d commit c36ff26

File tree

5 files changed

+674
-0
lines changed

5 files changed

+674
-0
lines changed

drivers/spi/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ config SPI_MASTER
4747

4848
if SPI_MASTER
4949

50+
config SPI_MEM
51+
bool "SPI memory extension"
52+
help
53+
Enable this option if you want to enable the SPI memory extension.
54+
This extension is meant to simplify interaction with SPI memories
55+
by providing an high-level interface to send memory-like commands.
56+
5057
comment "SPI Master Controller Drivers"
5158

5259
config SPI_ALTERA

drivers/spi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ccflags-$(CONFIG_SPI_DEBUG) := -DDEBUG
88
# small core, mostly translating board-specific
99
# config declarations into driver model code
1010
obj-$(CONFIG_SPI_MASTER) += spi.o
11+
obj-$(CONFIG_SPI_MEM) += spi-mem.o
1112
obj-$(CONFIG_SPI_SPIDEV) += spidev.o
1213
obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o
1314

0 commit comments

Comments
 (0)