summaryrefslogtreecommitdiff
path: root/mm/tests/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2026-06-12 08:28:35 +0800
committerMark Brown <broonie@kernel.org>2026-06-16 21:43:53 +0100
commit66b6605bcea7af7aca3d1d858b9c5f14903f9f9a (patch)
tree014b60447119093d9814c2b5b49a53c702972a70 /mm/tests/git@git.tavy.me:linux.git
parentf3ad1c87d8201e54b66bd6072442f0b5d5a308ee (diff)
spi: dw: fix wrong BAUDR setting after resume
After resuming from suspend to ram, spi transfer stops working. Further debugging shows that the BAUDR register isn't correctly set, this is due to dws->current_freq doesn't match the HW BAUDR setting, specifically, the dws->current_freq equals to speed_hz, but BAUDR is 0. so the dw_spi_set_clk() in below code won't be called: if (dws->current_freq != speed_hz) { dw_spi_set_clk(dws, clk_div); dws->current_freq = speed_hz; } The mismatch comes from dw_spi_shutdown_chip() when suspending. Fix this mismatch by setting dws->current_freq to 0 as well when clearing BAUDR reg in dw_spi_shutdown_chip(). Fixes: e24c74527207 ("spi: controller driver for Designware SPI core") Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Link: https://patch.msgid.link/20260612002835.5240-1-jszhang@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'mm/tests/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions