Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1641383
| From | Quentin Schulz <quentin.schulz@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] ASoC: atmel-classd: sync regcache when resuming |
| Date | 2017-05-15 10:40 +0200 |
| Message-ID | <tHjHP-5H0-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The PM functions used in this driver are the ones defined in
sounc/soc/soc-core.c.
When suspending (using snd_soc_suspend), the regcache is marked dirty
but is never synced on resume.
Sync regcache on resume of Atmel ClassD device.
Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
---
sound/soc/atmel/atmel-classd.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index 7ae46c2647d4..b7ef8c59b49a 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -301,6 +301,14 @@ static int atmel_classd_codec_probe(struct snd_soc_codec *codec)
return 0;
}
+static int atmel_classd_codec_resume(struct snd_soc_codec *codec)
+{
+ struct snd_soc_card *card = snd_soc_codec_get_drvdata(codec);
+ struct atmel_classd *dd = snd_soc_card_get_drvdata(card);
+
+ return regcache_sync(dd->regmap);
+}
+
static struct regmap *atmel_classd_codec_get_remap(struct device *dev)
{
return dev_get_regmap(dev, NULL);
@@ -308,6 +316,7 @@ static struct regmap *atmel_classd_codec_get_remap(struct device *dev)
static struct snd_soc_codec_driver soc_codec_dev_classd = {
.probe = atmel_classd_codec_probe,
+ .resume = atmel_classd_codec_resume,
.get_regmap = atmel_classd_codec_get_remap,
.component_driver = {
.controls = atmel_classd_snd_controls,
--
2.11.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] ASoC: atmel-classd: sync regcache when resuming Quentin Schulz <quentin.schulz@free-electrons.com> - 2017-05-15 10:40 +0200 Re: [PATCH] ASoC: atmel-classd: sync regcache when resuming Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-15 11:50 +0200 Re: [PATCH] ASoC: atmel-classd: sync regcache when resuming Nicolas Ferre <nicolas.ferre@microchip.com> - 2017-05-15 15:00 +0200 Applied "ASoC: atmel-classd: sync regcache when resuming" to the asoc tree Mark Brown <broonie@kernel.org> - 2017-05-17 12:00 +0200
csiph-web