summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-mem.c
diff options
context:
space:
mode:
authorYogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com>2018-12-03 08:39:12 +0000
committerMark Brown <broonie@kernel.org>2018-12-03 17:20:14 +0000
commitb12a084c8729ef423089bb9a5a143eed39cd94e7 (patch)
treea86f41de1f25d7464c670788737f15d18ff81965 /drivers/spi/spi-mem.c
parent6b03061f882de49b83ccf44beb3a12c920a2da1b (diff)
downloadlinux-b12a084c8729ef423089bb9a5a143eed39cd94e7.tar.bz2
spi: spi-mem: add support for octal mode I/O data transfer
Add support for octal mode I/O data transfer in spi-mem framework. Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mem.c')
-rw-r--r--drivers/spi/spi-mem.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index 62a7b80801d2..5e15d62775e9 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -12,7 +12,7 @@
#include "internals.h"
-#define SPI_MEM_MAX_BUSWIDTH 4
+#define SPI_MEM_MAX_BUSWIDTH 8
/**
* spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a
@@ -121,6 +121,13 @@ static int spi_check_buswidth_req(struct spi_mem *mem, u8 buswidth, bool tx)
break;
+ case 8:
+ if ((tx && (mode & SPI_TX_OCTAL)) ||
+ (!tx && (mode & SPI_RX_OCTAL)))
+ return 0;
+
+ break;
+
default:
break;
}