All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@microchip.com>
To: <jagan@amarulasolutions.com>, <Eugen.Hristev@microchip.com>
Cc: <u-boot@lists.denx.de>, Tudor Ambarus <tudor.ambarus@microchip.com>
Subject: [PATCH v2] spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller
Date: Fri, 8 Apr 2022 11:40:26 +0300	[thread overview]
Message-ID: <20220408084026.734235-1-tudor.ambarus@microchip.com> (raw)

Use the spi_mem_default_supports_op() core helper in order to take into
account the buswidth specified by the user in device tree.

Fixes: 24c8ff4684 ("spi: Add Atmel QuadSPI driver")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
v2: Fix commit's subject

 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 098298336d..cb64119f97 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -438,6 +438,9 @@ static bool atmel_qspi_supports_op(struct spi_slave *slave,
 {
 	struct atmel_qspi *aq = dev_get_priv(slave->dev->parent);
 
+	if (!spi_mem_default_supports_op(slave, op))
+		return false;
+
 	if (aq->caps->octal) {
 		if (atmel_qspi_sama7g5_find_mode(op) < 0)
 			return false;
-- 
2.25.1


             reply	other threads:[~2022-04-08  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  8:40 Tudor Ambarus [this message]
2022-04-27  6:07 ` [PATCH v2] spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller Eugen.Hristev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220408084026.734235-1-tudor.ambarus@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=Eugen.Hristev@microchip.com \
    --cc=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.