Skip to content

Commit

Permalink
ASoC: wm8770: Remove unneeded bias level manipulation
Browse files Browse the repository at this point in the history
Since the device is now idle_bias_off these never have any useful effect,
the device will be brought to _OFF when idle, and will at best leave it
powered for longer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Oct 15, 2012
1 parent dc43b04 commit c16a742
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions sound/soc/codecs/wm8770.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,23 +572,6 @@ static struct snd_soc_dai_driver wm8770_dai = {
.symmetric_rates = 1
};

#ifdef CONFIG_PM
static int wm8770_suspend(struct snd_soc_codec *codec)
{
wm8770_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}

static int wm8770_resume(struct snd_soc_codec *codec)
{
wm8770_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
#else
#define wm8770_suspend NULL
#define wm8770_resume NULL
#endif

static int wm8770_probe(struct snd_soc_codec *codec)
{
struct wm8770_priv *wm8770;
Expand Down Expand Up @@ -642,8 +625,6 @@ static int wm8770_probe(struct snd_soc_codec *codec)
goto err_reg_enable;
}

wm8770_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

/* latch the volume update bits */
snd_soc_update_bits(codec, WM8770_MSDIGVOL, 0x100, 0x100);
snd_soc_update_bits(codec, WM8770_MSALGVOL, 0x100, 0x100);
Expand Down Expand Up @@ -680,7 +661,6 @@ static int wm8770_remove(struct snd_soc_codec *codec)
int i;

wm8770 = snd_soc_codec_get_drvdata(codec);
wm8770_set_bias_level(codec, SND_SOC_BIAS_OFF);

for (i = 0; i < ARRAY_SIZE(wm8770->supplies); ++i)
regulator_unregister_notifier(wm8770->supplies[i].consumer,
Expand All @@ -692,8 +672,6 @@ static int wm8770_remove(struct snd_soc_codec *codec)
static struct snd_soc_codec_driver soc_codec_dev_wm8770 = {
.probe = wm8770_probe,
.remove = wm8770_remove,
.suspend = wm8770_suspend,
.resume = wm8770_resume,
.set_bias_level = wm8770_set_bias_level,
.idle_bias_off = true,
};
Expand Down

0 comments on commit c16a742

Please sign in to comment.