clk: si521xx: restore cache_only on regcache_sync() failure in resume
PATCH 1/1 clk: si521xx: restore cache_only on regcache_sync() failure in resume
From: bui duc phuc <[email protected]>
If regcache_sync() fails in si521xx_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 si521xx_suspend().
Signed-off-by bui duc phuc <[email protected]>
--- drivers/clk/clk-si521xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/clk-si521xx.c +3 -1
@@ -358,8 +358,10 @@ static int __maybe_unused si521xx_resume(struct device *dev)regcache_cache_only (si->regmap, false); ret =regcache_sync (si->regmap); -if (ret) +if (ret) { +regcache_cache_only (si->regmap, true);dev_err (dev,"Failed to restore register map: %d\n" , ret); + }return ret; }
Signature · 1 line
2.43.0
Brian Masney
AppliedQuoted 1 line · On Fri, 24 Jul 2026 14:04:57 +0700, [email protected] wrote:
clk: si521xx: restore
cache_onlyonregcache_sync()failure in resume
Applied, thanks!
[1/1] clk: si521xx: restore cache_only on regcache_sync() failure in resume
commit: 906fddec02bc9381ca872544820bd4d610cfa20c
Best regards,
Signature · 1 line
Brian Masney <[email protected]>