diff options
author | Sowjanya Komatineni <skomatineni@nvidia.com> | 2020-12-21 13:17:35 -0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-01-06 13:09:31 +0000 |
commit | 98621ed011c57ba6e52e01a5982b221c9943b6d9 (patch) | |
tree | 505e60214ccdf5bd51918cf52730416bee2de05f /drivers/spi/spi-mem.c | |
parent | 921fc1838fb036f690b8ba52e6a6d3644b475cbb (diff) | |
download | lwn-98621ed011c57ba6e52e01a5982b221c9943b6d9.tar.gz lwn-98621ed011c57ba6e52e01a5982b221c9943b6d9.zip |
spi: spi-mem: Mark dummy transfers by setting dummy_data bit
This patch marks dummy transfer by setting dummy_data bit to 1.
Controllers supporting dummy transfer by hardware use this bit field
to skip software transfer of dummy bytes and use hardware dummy bytes
transfer.
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Link: https://lore.kernel.org/r/1608585459-17250-6-git-send-email-skomatineni@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mem.c')
-rw-r--r-- | drivers/spi/spi-mem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c index f3a3f196e628..c64371ce6c38 100644 --- a/drivers/spi/spi-mem.c +++ b/drivers/spi/spi-mem.c @@ -354,6 +354,7 @@ int spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) xfers[xferpos].tx_buf = tmpbuf + op->addr.nbytes + 1; xfers[xferpos].len = op->dummy.nbytes; xfers[xferpos].tx_nbits = op->dummy.buswidth; + xfers[xferpos].dummy_data = 1; spi_message_add_tail(&xfers[xferpos], &msg); xferpos++; totalxferlen += op->dummy.nbytes; |