diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2022-04-06 16:36:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-27 13:50:50 +0200 |
commit | cb158b152ea6823ac4ba8ae313d5336c2e846b46 (patch) | |
tree | a1492159f6d8aaa727a2ea0a73db1e3fa13b0292 | |
parent | 1b6ad2421084375afeb5e833bba28196e62035c2 (diff) |
spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller
commit 8c235cc25087495c4288d94f547e9d3061004991 upstream.
Use the spi_mem_default_supports_op() core helper in order to take into
account the buswidth specified by the user in device tree.
Cc: <stable@vger.kernel.org>
Fixes: 0e6aae08e9ae ("spi: Add QuadSPI driver for Atmel SAMA5D2")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20220406133604.455356-1-tudor.ambarus@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/spi/atmel-quadspi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index 5fd929e023e1..b4d85fd62ce9 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -202,6 +202,9 @@ static int atmel_qspi_find_mode(const struct spi_mem_op *op) static bool atmel_qspi_supports_op(struct spi_mem *mem, const struct spi_mem_op *op) { + if (!spi_mem_default_supports_op(mem, op)) + return false; + if (atmel_qspi_find_mode(op) < 0) return false; |