* [PATCH] clk: rs9: restore cache_only on regcache_sync() failure in resume
@ 2026-07-24 6:56 phucduc.bui
0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-07-24 6:56 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Brian Masney, linux-clk
Cc: linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
If regcache_sync() fails in rs9_resume(), the function only logs the
error, leaving regmap with cache_only disabled even though the register
cache has not been synchronized with the hardware.
Re-enable cache_only on failure to restore the state established by
rs9_suspend().
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/clk/clk-renesas-pcie.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c
index 2f6d80ee77cc..a2d7417e05ef 100644
--- a/drivers/clk/clk-renesas-pcie.c
+++ b/drivers/clk/clk-renesas-pcie.c
@@ -370,8 +370,10 @@ static int rs9_resume(struct device *dev)
regcache_cache_only(rs9->regmap, false);
ret = regcache_sync(rs9->regmap);
- if (ret)
+ if (ret) {
+ regcache_cache_only(rs9->regmap, true);
dev_err(dev, "Failed to restore register map: %d\n", ret);
+ }
return ret;
}
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-24 6:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 6:56 [PATCH] clk: rs9: restore cache_only on regcache_sync() failure in resume phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox