linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: linux-spi@vger.kernel.org
Cc: "Marek Vasut" <marex@denx.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Mark Brown" <broonie@kernel.org>
Subject: [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
Date: Mon, 26 Jul 2021 12:15:02 +0200	[thread overview]
Message-ID: <20210726101502.6803-1-marex@denx.de> (raw)

For (2 * 1000000) / min_speed_hz < 10 to be true in naturals with zero,
the min_speed_hz must above 222222. Update the comment. No functional
change.

Fixes: 6fd8b8503a0dc ("spi: spi-imx: Fix out-of-order CS/SCLK operation at low speeds")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Mark Brown <broonie@kernel.org>
---
Note: Drop the Fixes if it makes no sense to backport this.
---
 drivers/spi/spi-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index cb9f7261c4385..f474f76753bc1 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -593,7 +593,7 @@ static int mx51_ecspi_prepare_message(struct spi_imx_data *spi_imx,
 	}
 
 	delay = (2 * 1000000) / min_speed_hz;
-	if (likely(delay < 10))	/* SCLK is faster than 100 kHz */
+	if (likely(delay < 10))	/* SCLK is faster than 222.2 kHz */
 		udelay(delay);
 	else			/* SCLK is _very_ slow */
 		usleep_range(delay, delay + 10);
-- 
2.30.2


             reply	other threads:[~2021-07-26 10:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 10:15 Marek Vasut [this message]
2021-07-27 12:15 ` [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment Mark Brown
2021-07-27 15:55   ` Marek Vasut
2021-07-27 15:58     ` Mark Brown
2021-07-27 13:01 ` Uwe Kleine-König
2021-07-27 15:52   ` Marek Vasut
2021-07-28 23:27 ` Mark Brown

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=20210726101502.6803-1-marex@denx.de \
    --to=marex@denx.de \
    --cc=broonie@kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).