Skip to contentSkip to conversation

mfd: arizona: Check errors from regcache_sync()

PATCH Applied Mark Brown 2 participants 2 messages Jan 4, 2013 – Jan 22, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: arizona: Check errors from regcache_sync()

If the control bus is unrelabile we may hit errors during regcache_sync(), especially given that it tends to be one the most dense bursts of I/O in many systems.

---
 drivers/mfd/arizona-core.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/mfd/arizona-core.c +6 -1
index 2281e80..f8738aa 100644
@@ -239,7 +239,12 @@ static int arizona_runtime_resume(struct device *dev)
 		return ret;
 	}
 
-	regcache_sync(arizona->regmap);
+	ret = regcache_sync(arizona->regmap);
+	if (ret != 0) {
+		dev_err(arizona->dev, "Failed to restore register cache\n");
+		regulator_disable(arizona->dcvdd);
+		return ret;
+	}
 
 	return 0;
 }
Signature · 1 line
1.7.10.4
Applied
#1 lore raw

Hi Mark,

Quoted 8 lines · Mark Brown

If the control bus is unrelabile we may hit errors during regcache_sync(), especially given that it tends to be one the most dense bursts of I/O in many systems.

---
 drivers/mfd/arizona-core.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Applied to my for-linus branch, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/