Skip to contentSkip to conversation

spi: imx: mx51-ecspi: Fix CONFIGREG delay comment

PATCH Superseded Marek Vasut 3 participants 7 messages Jul 26, 2021 – Jul 28, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: imx: mx51-ecspi: Fix CONFIGREG delay comment

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")
Cc Uwe Kleine-König <[email protected]>
Cc Mark Brown <[email protected]>

---
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(-)
drivers/spi/spi-imx.c +1 -1
index cb9f7261c4385..f474f76753bc1 100644
@@ -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);
Signature · 1 line
2.30.2
maintainer
#1 lore raw
Quoted 3 lines · Marek Vasut

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.

This doesn't apply against current code, please check and resend.

#2 lore raw
Quoted 6 lines · Mark Brown
Quoted 3 lines · Marek Vasut

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.

This doesn't apply against current code, please check and resend.

Hm, yes, it conflicts with
[PATCH V2] spi: imx: mx51-ecspi: Fix low-speed CONFIGREG delay calculation

So maybe I'll wait until this one gets applied and picked by stable, and then I'll send the comment fix ? That should make things easier.

maintainer
#3 lore raw
Quoted 2 lines · Marek Vasut

So maybe I'll wait until this one gets applied and picked by stable, and then I'll send the comment fix ? That should make things easier.

Sure. No need to wait for stable I guess, once it's applied everything should be fine.

#4 lore raw
In reply to Marek Vasut
Quoted 3 lines · Marek Vasut

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.

With integer division delay is < 10 if min_speed_hz >= 200001.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
#5 lore raw
Quoted 6 lines · Uwe Kleine-König
Quoted 3 lines · Marek Vasut

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.

With integer division delay is < 10 if min_speed_hz >= 200001.

Right, it's not 181, 100 or 222. I'll send a V2 and clarify this.

maintainer
#6 lore raw
In reply to Marek Vasut
Quoted 3 lines · Marek Vasut

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.

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