ASoC: rt5645: Use update_bits for bit control
authorBard Liao <bardliao@realtek.com>
Fri, 27 Mar 2015 12:19:08 +0000 (20:19 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 27 Mar 2015 16:48:57 +0000 (09:48 -0700)
In codec bias level off, we need to disable gate mode with MCLK
for power saving. It is set by one bit. We don't need to write
while register for that.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c

index f9edf09253d9f47de2fe37d5410ee22ed3418bd0..b6d5b9570efb591646db1233f6d5a2533aee4814 100644 (file)
@@ -2396,7 +2396,8 @@ static int rt5645_set_bias_level(struct snd_soc_codec *codec,
 
        case SND_SOC_BIAS_OFF:
                snd_soc_write(codec, RT5645_DEPOP_M2, 0x1100);
-               snd_soc_write(codec, RT5645_GEN_CTRL1, 0x0128);
+               snd_soc_update_bits(codec, RT5645_GEN_CTRL1,
+                               RT5645_DIG_GATE_CTRL, 0);
                snd_soc_update_bits(codec, RT5645_PWR_ANLG1,
                                RT5645_PWR_VREF1 | RT5645_PWR_MB |
                                RT5645_PWR_BG | RT5645_PWR_VREF2 |