diff mbox series

[V2] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment

Message ID 20210727160428.7673-1-marex@denx.de (mailing list archive)
State Accepted
Commit 36c2530ea963884eeb0097169f853fdc36f16ad7
Headers show
Series [V2] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment | expand

Commit Message

Marek Vasut July 27, 2021, 4:04 p.m. UTC
For (2 * 1000000) / min_speed_hz < 10 to be true in naturals with zero,
the min_speed_hz must be above 200000 (i.e. 200001 rounds down to 9, so
the condition triggers). 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>
---
V2: It is not 100 kHz, 181 kHz, 222 kHz, it is 200 kHz. Make it so.
---
 drivers/spi/spi-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Uwe Kleine-König July 28, 2021, 8:37 a.m. UTC | #1
On Tue, Jul 27, 2021 at 06:04:28PM +0200, Marek Vasut wrote:
> For (2 * 1000000) / min_speed_hz < 10 to be true in naturals with zero,
> the min_speed_hz must be above 200000 (i.e. 200001 rounds down to 9, so
> the condition triggers). 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>
> ---
> V2: It is not 100 kHz, 181 kHz, 222 kHz, it is 200 kHz. Make it so.

:-)

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks for addressing my comments.

Best regards
Uwe
Mark Brown July 28, 2021, 11:27 p.m. UTC | #2
On Tue, 27 Jul 2021 18:04:28 +0200, Marek Vasut wrote:
> For (2 * 1000000) / min_speed_hz < 10 to be true in naturals with zero,
> the min_speed_hz must be above 200000 (i.e. 200001 rounds down to 9, so
> the condition triggers). Update the comment. No functional change.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
      commit: 36c2530ea963884eeb0097169f853fdc36f16ad7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 75a82d6cac785..e3231b501ae06 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -598,7 +598,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 200 kHz */
 		udelay(delay);
 	else			/* SCLK is _very_ slow */
 		usleep_range(delay, delay + 10);