]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branches 'asoc/topic/wm8978', 'asoc/topic/wm8983', 'asoc/topic...
authorMark Brown <broonie@kernel.org>
Mon, 8 Dec 2014 13:12:32 +0000 (13:12 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 8 Dec 2014 13:12:32 +0000 (13:12 +0000)
sound/soc/codecs/wm8978.c
sound/soc/codecs/wm8983.c
sound/soc/codecs/wm8985.c
sound/soc/codecs/wm8988.c
sound/soc/codecs/wm8990.c

index ee2ba574952b5184d8169b2e116a05c698bfd4d0..cf70329117211806ad7f43a38bd3725b6cc1b0e0 100644 (file)
@@ -991,21 +991,11 @@ static int wm8978_probe(struct snd_soc_codec *codec)
        for (i = 0; i < ARRAY_SIZE(update_reg); i++)
                snd_soc_update_bits(codec, update_reg[i], 0x100, 0x100);
 
-       wm8978_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-
-       return 0;
-}
-
-/* power down chip */
-static int wm8978_remove(struct snd_soc_codec *codec)
-{
-       wm8978_set_bias_level(codec, SND_SOC_BIAS_OFF);
        return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8978 = {
        .probe =        wm8978_probe,
-       .remove =       wm8978_remove,
        .suspend =      wm8978_suspend,
        .resume =       wm8978_resume,
        .set_bias_level = wm8978_set_bias_level,
index ac5defda882480bf49e20869ea4dbb8b23bd7cc2..5d1cf08a72b872539fc8fce5a5c228ce69d1cfb5 100644 (file)
@@ -967,29 +967,6 @@ static int wm8983_set_bias_level(struct snd_soc_codec *codec,
        return 0;
 }
 
-#ifdef CONFIG_PM
-static int wm8983_suspend(struct snd_soc_codec *codec)
-{
-       wm8983_set_bias_level(codec, SND_SOC_BIAS_OFF);
-       return 0;
-}
-
-static int wm8983_resume(struct snd_soc_codec *codec)
-{
-       wm8983_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       return 0;
-}
-#else
-#define wm8983_suspend NULL
-#define wm8983_resume NULL
-#endif
-
-static int wm8983_remove(struct snd_soc_codec *codec)
-{
-       wm8983_set_bias_level(codec, SND_SOC_BIAS_OFF);
-       return 0;
-}
-
 static int wm8983_probe(struct snd_soc_codec *codec)
 {
        int ret;
@@ -1055,10 +1032,8 @@ static struct snd_soc_dai_driver wm8983_dai = {
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8983 = {
        .probe = wm8983_probe,
-       .remove = wm8983_remove,
-       .suspend = wm8983_suspend,
-       .resume = wm8983_resume,
        .set_bias_level = wm8983_set_bias_level,
+       .suspend_bias_off = true,
        .controls = wm8983_snd_controls,
        .num_controls = ARRAY_SIZE(wm8983_snd_controls),
        .dapm_widgets = wm8983_dapm_widgets,
index ee380190399fffa8aeb594ee9911d5560988627b..0b3b54c9971dc7300337f401c32b261b8db576d5 100644 (file)
@@ -961,29 +961,6 @@ static int wm8985_set_bias_level(struct snd_soc_codec *codec,
        return 0;
 }
 
-#ifdef CONFIG_PM
-static int wm8985_suspend(struct snd_soc_codec *codec)
-{
-       wm8985_set_bias_level(codec, SND_SOC_BIAS_OFF);
-       return 0;
-}
-
-static int wm8985_resume(struct snd_soc_codec *codec)
-{
-       wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       return 0;
-}
-#else
-#define wm8985_suspend NULL
-#define wm8985_resume NULL
-#endif
-
-static int wm8985_remove(struct snd_soc_codec *codec)
-{
-       wm8985_set_bias_level(codec, SND_SOC_BIAS_OFF);
-       return 0;
-}
-
 static int wm8985_probe(struct snd_soc_codec *codec)
 {
        size_t i;
@@ -1023,7 +1000,6 @@ static int wm8985_probe(struct snd_soc_codec *codec)
        snd_soc_update_bits(codec, WM8985_BIAS_CTRL, WM8985_BIASCUT,
                            WM8985_BIASCUT);
 
-       wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
        return 0;
 
 err_reg_enable:
@@ -1064,10 +1040,8 @@ static struct snd_soc_dai_driver wm8985_dai = {
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8985 = {
        .probe = wm8985_probe,
-       .remove = wm8985_remove,
-       .suspend = wm8985_suspend,
-       .resume = wm8985_resume,
        .set_bias_level = wm8985_set_bias_level,
+       .suspend_bias_off = true,
 
        .controls = wm8985_snd_controls,
        .num_controls = ARRAY_SIZE(wm8985_snd_controls),
index a5130d9651469b0e1f0c30653e0d76a00f98c21d..e418199155a8824d0a5cb6fb2cb02b22ffd1c3b8 100644 (file)
@@ -793,21 +793,6 @@ static struct snd_soc_dai_driver wm8988_dai = {
        .symmetric_rates = 1,
 };
 
-static int wm8988_suspend(struct snd_soc_codec *codec)
-{
-       struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec);
-
-       wm8988_set_bias_level(codec, SND_SOC_BIAS_OFF);
-       regcache_mark_dirty(wm8988->regmap);
-       return 0;
-}
-
-static int wm8988_resume(struct snd_soc_codec *codec)
-{
-       wm8988_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       return 0;
-}
-
 static int wm8988_probe(struct snd_soc_codec *codec)
 {
        int ret = 0;
@@ -825,23 +810,13 @@ static int wm8988_probe(struct snd_soc_codec *codec)
        snd_soc_update_bits(codec, WM8988_ROUT2V, 0x0100, 0x0100);
        snd_soc_update_bits(codec, WM8988_RINVOL, 0x0100, 0x0100);
 
-       wm8988_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-
-       return 0;
-}
-
-static int wm8988_remove(struct snd_soc_codec *codec)
-{
-       wm8988_set_bias_level(codec, SND_SOC_BIAS_OFF);
        return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8988 = {
        .probe =        wm8988_probe,
-       .remove =       wm8988_remove,
-       .suspend =      wm8988_suspend,
-       .resume =       wm8988_resume,
        .set_bias_level = wm8988_set_bias_level,
+       .suspend_bias_off = true,
 
        .controls = wm8988_snd_controls,
        .num_controls = ARRAY_SIZE(wm8988_snd_controls),
index 03e43e3f395e5472a0028b5b28ea091f01238b7e..8a584229310a72daba726678b8e2342b3e431d23 100644 (file)
@@ -1271,18 +1271,6 @@ static struct snd_soc_dai_driver wm8990_dai = {
        .ops = &wm8990_dai_ops,
 };
 
-static int wm8990_suspend(struct snd_soc_codec *codec)
-{
-       wm8990_set_bias_level(codec, SND_SOC_BIAS_OFF);
-       return 0;
-}
-
-static int wm8990_resume(struct snd_soc_codec *codec)
-{
-       wm8990_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       return 0;
-}
-
 /*
  * initialise the WM8990 driver
  * register the mixer and dsp interfaces with the kernel
@@ -1309,19 +1297,11 @@ static int wm8990_probe(struct snd_soc_codec *codec)
        return 0;
 }
 
-/* power down chip */
-static int wm8990_remove(struct snd_soc_codec *codec)
-{
-       wm8990_set_bias_level(codec, SND_SOC_BIAS_OFF);
-       return 0;
-}
-
 static struct snd_soc_codec_driver soc_codec_dev_wm8990 = {
        .probe =        wm8990_probe,
-       .remove =       wm8990_remove,
-       .suspend =      wm8990_suspend,
-       .resume =       wm8990_resume,
        .set_bias_level = wm8990_set_bias_level,
+       .suspend_bias_off = true,
+
        .controls =     wm8990_snd_controls,
        .num_controls = ARRAY_SIZE(wm8990_snd_controls),
        .dapm_widgets = wm8990_dapm_widgets,