All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
@ 2021-07-26 10:15 Marek Vasut
  2021-07-27 12:15 ` Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Marek Vasut @ 2021-07-26 10:15 UTC (permalink / raw)
  To: linux-spi; +Cc: Marek Vasut, Uwe Kleine-König, Mark Brown

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
  2021-07-26 10:15 [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment Marek Vasut
@ 2021-07-27 12:15 ` Mark Brown
  2021-07-27 15:55   ` Marek Vasut
  2021-07-27 13:01 ` Uwe Kleine-König
  2021-07-28 23:27 ` Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2021-07-27 12:15 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-spi, Uwe Kleine-König

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

On Mon, Jul 26, 2021 at 12:15:02PM +0200, Marek Vasut wrote:
> 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
  2021-07-26 10:15 [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment Marek Vasut
  2021-07-27 12:15 ` 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
  2 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2021-07-27 13:01 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-spi, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

On Mon, Jul 26, 2021 at 12:15:02PM +0200, Marek Vasut wrote:
> 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

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
  2021-07-27 13:01 ` Uwe Kleine-König
@ 2021-07-27 15:52   ` Marek Vasut
  0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2021-07-27 15:52 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-spi, Mark Brown

On 7/27/21 3:01 PM, Uwe Kleine-König wrote:
> On Mon, Jul 26, 2021 at 12:15:02PM +0200, Marek Vasut wrote:
>> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
  2021-07-27 12:15 ` Mark Brown
@ 2021-07-27 15:55   ` Marek Vasut
  2021-07-27 15:58     ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2021-07-27 15:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, Uwe Kleine-König

On 7/27/21 2:15 PM, Mark Brown wrote:
> On Mon, Jul 26, 2021 at 12:15:02PM +0200, Marek Vasut wrote:
>> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
  2021-07-27 15:55   ` Marek Vasut
@ 2021-07-27 15:58     ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2021-07-27 15:58 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-spi, Uwe Kleine-König

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

On Tue, Jul 27, 2021 at 05:55:26PM +0200, Marek Vasut wrote:

> 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment
  2021-07-26 10:15 [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment Marek Vasut
  2021-07-27 12:15 ` Mark Brown
  2021-07-27 13:01 ` Uwe Kleine-König
@ 2021-07-28 23:27 ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2021-07-28 23:27 UTC (permalink / raw)
  To: linux-spi, Marek Vasut; +Cc: Mark Brown, Uwe Kleine-König

On Mon, 26 Jul 2021 12:15:02 +0200, Marek Vasut wrote:
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-28 23:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 10:15 [PATCH] spi: imx: mx51-ecspi: Fix CONFIGREG delay comment Marek Vasut
2021-07-27 12:15 ` 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

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.