Skip to contentSkip to conversation

clk: rs9: restore cache_only on regcache_sync() failure in resume

PATCH Applied [email protected] 2 participants 2 messages Jul 24 – Sep 29 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: rs9: restore cache_only on regcache_sync() failure in resume

From: bui duc phuc <[email protected]>

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

---
 drivers/clk/clk-renesas-pcie.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/clk-renesas-pcie.c +3 -1
index 2f6d80ee77cc..a2d7417e05ef 100644
@@ -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;
 }
 
Signature · 1 line
2.43.0
Applied
#1 lore raw
Quoted 1 line · On Fri, 24 Jul 2026 13:56:58 +0700, [email protected] wrote:

clk: rs9: restore cache_only on regcache_sync() failure in resume

Applied, thanks!

[1/1] clk: rs9: restore cache_only on regcache_sync() failure in resume

      commit: 29e5259e30012bfb0f48345ac7d89999f17e1f26

Best regards,

Signature · 1 line
Brian Masney <[email protected]>