[alsa-devel] [PATCH] mfd: arizona: Move regulator disable to after	marking cache only
    Charles Keepax 
    ckeepax at opensource.wolfsonmicro.com
       
    Wed Jul  3 16:01:01 CEST 2013
    
    
  
If we disable DCVDD before we mark the cache as cache only, we might
attempt to write to the chip whilst it is powered down and lose a write.
Signed-off-by: Charles Keepax <ckeepax at opensource.wolfsonmicro.com>
---
 drivers/mfd/arizona-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 6ab0304..aa47709 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -388,9 +388,9 @@ static int arizona_runtime_suspend(struct device *dev)
 
 	dev_dbg(arizona->dev, "Entering AoD mode\n");
 
-	regulator_disable(arizona->dcvdd);
 	regcache_cache_only(arizona->regmap, true);
 	regcache_mark_dirty(arizona->regmap);
+	regulator_disable(arizona->dcvdd);
 
 	return 0;
 }
-- 
1.7.2.5
    
    
More information about the Alsa-devel
mailing list