Skip to content

Commit

Permalink
spi: spi-mem: add support for octal mode I/O data transfer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yogesh Narayan Gaur authored and Mark Brown committed Dec 3, 2018
1 parent 6b03061 commit b12a084
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/spi/spi-mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit b12a084

Please sign in to comment.