Skip to contentSkip to conversation

ASoC: core: Mark regmap CODEC register maps as dirty when suspending

PATCH In review Mark Brown 2 participants 2 messages Sep 12, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: core: Mark regmap CODEC register maps as dirty when suspending

The core has for a long time had support for marking the register maps of devices dirty when suspending so that they are resynced on resume. Also implement this feature for CODECs using regmap.

---
 sound/soc/soc-core.c |    2 ++
 1 file changed, 2 insertions(+)
sound/soc/soc-core.c +2 -0
index 0c7e477..b94ce32 100644
@@ -635,6 +635,8 @@ int snd_soc_suspend(struct device *dev)
 				codec->driver->suspend(codec);
 				codec->suspended = 1;
 				codec->cache_sync = 1;
+				if (codec->using_regmap)
+					regcache_mark_dirty(codec->control_data);
 				break;
 			default:
 				dev_dbg(codec->dev, "CODEC is on over suspend\n");
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Mark Brown

The core has for a long time had support for marking the register maps of devices dirty when suspending so that they are resynced on resume. Also implement this feature for CODECs using regmap.

---
 sound/soc/soc-core.c |    2 ++
 1 file changed, 2 insertions(+)
sound/soc/soc-core.c +0 -0
index 0c7e477..b94ce32 100644

sound/soc/soc-core.c int snd_soc_suspend(struct device *dev) · line 642

Quoted 8 lines
sound/soc/soc-core.c +2 -0
@@ -635,6 +635,8 @@ int snd_soc_suspend(struct device *dev)
 				codec->driver->suspend(codec);
 				codec->suspended = 1;
 				codec->cache_sync = 1;
+				if (codec->using_regmap)
+					regcache_mark_dirty(codec->control_data);
 				break;
 			default:
 				dev_dbg(codec->dev, "CODEC is on over suspend\n");