[Internal PATCH 6/8] spi: atmel-quadspi.c: Fix the buswidth adjustment between spi-mem and controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx>
Fixes: 0e6aae08e9ae ("spi: Add QuadSPI driver for Atmel SAMA5D2")
Signed-off-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx>
(cherry picked from commit 41ddc39b3d13273648b9aa34075a085a31ce6031)
---
 drivers/spi/atmel-quadspi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 841eb826d2d4..1893293667ab 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -456,6 +456,9 @@ static bool atmel_qspi_supports_op(struct spi_mem *mem,
 {
 	struct atmel_qspi *aq = spi_controller_get_devdata(mem->spi->master);
 
+	if (!spi_mem_default_supports_op(mem, op))
+		return false;
+
 	if (aq->caps->octal) {
 		if (atmel_qspi_sama7g5_find_mode(op) < 0)
 			return false;
-- 
2.25.1




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux