spi: spi-mem: Add a new API to support direct mapping
authorBoris Brezillon <boris.brezillon@bootlin.com>
Tue, 6 Nov 2018 16:05:33 +0000 (17:05 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 20 Nov 2018 16:26:57 +0000 (16:26 +0000)
commitaa167f3fed0c37e0e4c707d4331d827661f46644
tree41a1b7431e865d9a477f1d3eac1850654fefb258
parentf86c24f4795303e4024bc113196de32782f6ccb5
spi: spi-mem: Add a new API to support direct mapping

Most modern SPI controllers can directly map a SPI memory (or a portion
of the SPI memory) in the CPU address space. Most of the time this
brings significant performance improvements as it automates the whole
process of sending SPI memory operations every time a new region is
accessed.

This new API allows SPI memory drivers to create direct mappings and
then use them to access the memory instead of using spi_mem_exec_op().

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mem.c
include/linux/spi/spi-mem.h