mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: dw: fix wrong RX_SAMPLE_DLY setting after resume
@ 2026-08-03 13:59 Jisheng Zhang
  2026-08-11 14:27 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2026-08-03 13:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel

On platforms which need a non-zero rx sample delay, the RX_SAMPLE_DLY
reg setting is lost after resume. The reason is that the reg may be
reset to 0 after resuming, but dws->cur_rx_sample_dly doesn't know
this fact. Fix this issue by clearing dws->cur_rx_sample_dly in
dw_spi_shutdown_chip().

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Suggested-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-dw.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
index 2f2debc64e73..a9d055f9c5dd 100644
--- a/drivers/spi/spi-dw.h
+++ b/drivers/spi/spi-dw.h
@@ -283,6 +283,7 @@ static inline void dw_spi_shutdown_chip(struct dw_spi *dws)
 	dw_spi_enable_chip(dws, 0);
 	dw_spi_set_clk(dws, 0);
 	dws->current_freq = 0;
+	dws->cur_rx_sample_dly = 0;
 }
 
 extern void dw_spi_set_cs(struct spi_device *spi, bool enable);
-- 
2.53.0


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

* Re: [PATCH] spi: dw: fix wrong RX_SAMPLE_DLY setting after resume
  2026-08-03 13:59 [PATCH] spi: dw: fix wrong RX_SAMPLE_DLY setting after resume Jisheng Zhang
@ 2026-08-11 14:27 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-08-11 14:27 UTC (permalink / raw)
  To: Jisheng Zhang; +Cc: linux-spi, linux-kernel

On Mon, 03 Aug 2026 21:59:25 +0800, Jisheng Zhang wrote:
> spi: dw: fix wrong RX_SAMPLE_DLY setting after resume

Applied to

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

Thanks!

[1/1] spi: dw: fix wrong RX_SAMPLE_DLY setting after resume
      https://git.kernel.org/broonie/spi/c/133c71b2c0bc

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] 2+ messages in thread

end of thread, other threads:[~2026-08-11 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-03 13:59 [PATCH] spi: dw: fix wrong RX_SAMPLE_DLY setting after resume Jisheng Zhang
2026-08-11 14:27 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®