Skip to content

Commit

Permalink
spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and c…
Browse files Browse the repository at this point in the history
…ontroller

commit 8c235cc 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
ambarus authored and gregkh committed Apr 27, 2022
1 parent 5727616 commit dccee74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/spi/atmel-quadspi.c
Expand Up @@ -277,6 +277,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;

Expand Down

0 comments on commit dccee74

Please sign in to comment.