ASoC: Mark WM5100 register map cache only when going into BIAS_OFF
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 18 Jan 2012 20:02:38 +0000 (20:02 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 20 Jan 2012 13:54:33 +0000 (13:54 +0000)
Writing to the registers won't work if we do actually manage to hit a fully
powered off state.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
sound/soc/codecs/wm5100.c

index 8b24323d6b2c89ecb5a751b17e1e747cb2d35807..3fd9cfe6dcd7c146ff64df78ae0f0d48731d07d0 100644 (file)
@@ -1402,6 +1402,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
                break;
 
        case SND_SOC_BIAS_OFF:
+               regcache_cache_only(wm5100->regmap, true);
                if (wm5100->pdata.ldo_ena)
                        gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
                regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),