From: Alexandre Belloni <alexandre.belloni@free-electrons.com> To: Quentin Schulz <quentin.schulz@free-electrons.com> Cc: nicolas.ferre@microchip.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, thomas.petazzoni@free-electrons.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: atmel-classd: sync regcache when resuming Date: Mon, 15 May 2017 11:46:23 +0200 [thread overview] Message-ID: <20170515094623.sumkphak4g3cuj3j@piout.net> (raw) In-Reply-To: <20170515083617.16742-1-quentin.schulz@free-electrons.com> On 15/05/2017 at 10:36:17 +0200, Quentin Schulz wrote: > 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> Acked-by: Alexandre Belloni <alexandre.belloni@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 > -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@free-electrons.com> To: Quentin Schulz <quentin.schulz@free-electrons.com> Cc: thomas.petazzoni@free-electrons.com, alsa-devel@alsa-project.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, nicolas.ferre@microchip.com, tiwai@suse.com, broonie@kernel.org Subject: Re: [PATCH] ASoC: atmel-classd: sync regcache when resuming Date: Mon, 15 May 2017 11:46:23 +0200 [thread overview] Message-ID: <20170515094623.sumkphak4g3cuj3j@piout.net> (raw) In-Reply-To: <20170515083617.16742-1-quentin.schulz@free-electrons.com> On 15/05/2017 at 10:36:17 +0200, Quentin Schulz wrote: > 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> Acked-by: Alexandre Belloni <alexandre.belloni@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 > -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
next prev parent reply other threads:[~2017-05-15 9:46 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-05-15 8:36 [PATCH] ASoC: atmel-classd: sync regcache when resuming Quentin Schulz 2017-05-15 9:46 ` Alexandre Belloni [this message] 2017-05-15 9:46 ` Alexandre Belloni 2017-05-15 12:59 ` Nicolas Ferre 2017-05-15 12:59 ` Nicolas Ferre 2017-05-17 9:51 ` Applied "ASoC: atmel-classd: sync regcache when resuming" to the asoc tree Mark Brown 2017-05-17 9:51 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170515094623.sumkphak4g3cuj3j@piout.net \ --to=alexandre.belloni@free-electrons.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=nicolas.ferre@microchip.com \ --cc=perex@perex.cz \ --cc=quentin.schulz@free-electrons.com \ --cc=thomas.petazzoni@free-electrons.com \ --cc=tiwai@suse.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.