Message ID | 1405704668-8038-1-git-send-email-dmurphy@ti.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e295a4a43e90d46d3b16374dc908533bb40a3936 |
Headers | show |
On Fri, Jul 18, 2014 at 12:31:07PM -0500, Dan Murphy wrote: > In the pm suspend/resume it is better > to disable the GPIO after the regmap_cache > setting calls so that if the call is interrupted > the new reg values will be cached and set on resume. > > Also add pm_runtime_put in the remove call. Applied, thanks, but please don't mix multiple changes into one commit like this especially when there's no textual overlap.
Mark On 07/21/2014 07:19 AM, Mark Brown wrote: > On Fri, Jul 18, 2014 at 12:31:07PM -0500, Dan Murphy wrote: >> In the pm suspend/resume it is better >> to disable the GPIO after the regmap_cache >> setting calls so that if the call is interrupted >> the new reg values will be cached and set on resume. >> >> Also add pm_runtime_put in the remove call. > Applied, thanks, but please don't mix multiple changes into one commit > like this especially when there's no textual overlap. I usually don't mix changes like this as I like to have a single change per commit. But I find each maintainer is a little different but now I know for next time. Thanks
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index f0760af..a3ae394 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -239,12 +239,12 @@ static int tas2552_runtime_suspend(struct device *dev) tas2552_sw_shutdown(tas2552, 0); - if (tas2552->enable_gpio) - gpiod_set_value(tas2552->enable_gpio, 0); - regcache_cache_only(tas2552->regmap, true); regcache_mark_dirty(tas2552->regmap); + if (tas2552->enable_gpio) + gpiod_set_value(tas2552->enable_gpio, 0); + return 0; } @@ -382,6 +382,8 @@ static int tas2552_codec_remove(struct snd_soc_codec *codec) { struct tas2552_data *tas2552 = snd_soc_codec_get_drvdata(codec); + pm_runtime_put(codec->dev); + if (tas2552->enable_gpio) gpiod_set_value(tas2552->enable_gpio, 0);
In the pm suspend/resume it is better to disable the GPIO after the regmap_cache setting calls so that if the call is interrupted the new reg values will be cached and set on resume. Also add pm_runtime_put in the remove call. Signed-off-by: Dan Murphy <dmurphy@ti.com> --- sound/soc/codecs/tas2552.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)