Re: [PATCH] ASoC: ak4642: Enable cache usage to fix crashes on resume

Mark Brown
2016-05-19T10:12:20Z

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

On Thu, May 19, 2016 at 09:33:15AM +0300, Peter Ujfalusi wrote:

> Should the ak4642 implement the suspend callback and:

> static int ak4642_suspend(struct snd_soc_codec *codec)
> {
> struct regmap *regmap = dev_get_regmap(codec->dev, NULL);
>
> regcache_cache_only(regmap, true);

> I know it is highly unlikely that anything is going to be written to the chip
> while the board is suspended. Probably the suspend and changing the cache only
> is not needed, but in this way things look a bit more complete?

Yes, that's more idiomatic - it also allows better sharing with runtime
PM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]