summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPratyush Yadav <p.yadav@ti.com>2020-06-23 21:30:14 +0300
committerMark Brown <broonie@kernel.org>2020-07-14 19:29:37 +0300
commit4c5e2bba30e49b970a0fd07b43e0b7a3b5fd5ea7 (patch)
tree26f3159168133fdb63292c707deb896d6248631e /drivers
parentb3a9e3b9622ae10064826dccb4f7a52bd88c7407 (diff)
downloadlinux-4c5e2bba30e49b970a0fd07b43e0b7a3b5fd5ea7.tar.xz
spi: spi-mem: allow specifying whether an op is DTR or not
Each phase is given a separate 'dtr' field so mixed protocols like 4S-4D-4D can be supported. Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/20200623183030.26591-2-p.yadav@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-mem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index 9a86cc27fcc0..93e255287ab9 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -156,6 +156,9 @@ bool spi_mem_default_supports_op(struct spi_mem *mem,
op->data.dir == SPI_MEM_DATA_OUT))
return false;
+ if (op->cmd.dtr || op->addr.dtr || op->dummy.dtr || op->data.dtr)
+ return false;
+
return true;
}
EXPORT_SYMBOL_GPL(spi_mem_default_supports_op);