Skip to content

Commit

Permalink
ASoC: wm8996: Replace codec->control_data with wm8996->regmap
Browse files Browse the repository at this point in the history
With the ongoing component-ization of the ASoC framework and the continuing
migration to using regmap for IO the control_data field of the snd_soc_codec
struct will eventually be removed. Prepare the wm8996 driver for this by using
wm8996->regmap instead of accessing the CODEC's control_data field.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Feb 25, 2014
1 parent 5cca5a9 commit b7c1b73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/soc/codecs/wm8996.c
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@ static int wm8996_set_bias_level(struct snd_soc_codec *codec,
msleep(5);
}

regcache_cache_only(codec->control_data, false);
regcache_sync(codec->control_data);
regcache_cache_only(wm8996->regmap, false);
regcache_sync(wm8996->regmap);
}

/* Bypass the MICBIASes for lowest power */
Expand All @@ -1620,10 +1620,10 @@ static int wm8996_set_bias_level(struct snd_soc_codec *codec,
break;

case SND_SOC_BIAS_OFF:
regcache_cache_only(codec->control_data, true);
regcache_cache_only(wm8996->regmap, true);
if (wm8996->pdata.ldo_ena >= 0) {
gpio_set_value_cansleep(wm8996->pdata.ldo_ena, 0);
regcache_cache_only(codec->control_data, true);
regcache_cache_only(wm8996->regmap, true);
}
regulator_bulk_disable(ARRAY_SIZE(wm8996->supplies),
wm8996->supplies);
Expand Down

0 comments on commit b7c1b73

Please sign in to comment.