Skip to content

Commit 8c235cc

Browse files
ambarusbroonie
authored andcommitted
spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller
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: 0e6aae0 ("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>
1 parent f1d388f commit 8c235cc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/spi/atmel-quadspi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ static int atmel_qspi_find_mode(const struct spi_mem_op *op)
277277
static bool atmel_qspi_supports_op(struct spi_mem *mem,
278278
const struct spi_mem_op *op)
279279
{
280+
if (!spi_mem_default_supports_op(mem, op))
281+
return false;
282+
280283
if (atmel_qspi_find_mode(op) < 0)
281284
return false;
282285

0 commit comments

Comments
 (0)