Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e53e4173 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Mark WM5100 register map cache only when going into BIAS_OFF



Writing to the registers won't work if we do actually manage to hit a fully
powered off state.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
parent 0c93a167
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1402,6 +1402,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
		break;
		break;


	case SND_SOC_BIAS_OFF:
	case SND_SOC_BIAS_OFF:
		regcache_cache_only(wm5100->regmap, true);
		if (wm5100->pdata.ldo_ena)
		if (wm5100->pdata.ldo_ena)
			gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
			gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
		regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),
		regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),