diff options
author | Bard Liao <bardliao@realtek.com> | 2016-10-17 07:27:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-10-24 13:31:38 -0400 |
commit | a5d93da13c8671f6453ae273cbf1d5c61b897a33 (patch) | |
tree | 6c9b37cffdc34a3d754327b491f922cf8a163951 /sound/soc/codecs/rt5670.c | |
parent | 1001354ca34179f3db924eb66672442a173147dc (diff) |
ASoC: rt5670: Enable MCLK detection
There is a power saving mechanism in rt5670. It will turn off some
unused power when MCLK is not present. We call that "MCLK detection"
and it should be enabled by default.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5670.c')
-rw-r--r-- | sound/soc/codecs/rt5670.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index 49caf1393aeb..6caac92143d4 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c | |||
@@ -2889,6 +2889,9 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, | |||
2889 | if (ret != 0) | 2889 | if (ret != 0) |
2890 | dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); | 2890 | dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); |
2891 | 2891 | ||
2892 | regmap_update_bits(rt5670->regmap, RT5670_DIG_MISC, | ||
2893 | RT5670_MCLK_DET, RT5670_MCLK_DET); | ||
2894 | |||
2892 | if (rt5670->pdata.in2_diff) | 2895 | if (rt5670->pdata.in2_diff) |
2893 | regmap_update_bits(rt5670->regmap, RT5670_IN2, | 2896 | regmap_update_bits(rt5670->regmap, RT5670_IN2, |
2894 | RT5670_IN_DF2, RT5670_IN_DF2); | 2897 | RT5670_IN_DF2, RT5670_IN_DF2); |
@@ -2903,7 +2906,6 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, | |||
2903 | RT5670_GP1_PIN_MASK, RT5670_GP1_PIN_IRQ); | 2906 | RT5670_GP1_PIN_MASK, RT5670_GP1_PIN_IRQ); |
2904 | regmap_update_bits(rt5670->regmap, RT5670_GPIO_CTRL2, | 2907 | regmap_update_bits(rt5670->regmap, RT5670_GPIO_CTRL2, |
2905 | RT5670_GP1_PF_MASK, RT5670_GP1_PF_OUT); | 2908 | RT5670_GP1_PF_MASK, RT5670_GP1_PF_OUT); |
2906 | regmap_update_bits(rt5670->regmap, RT5670_DIG_MISC, 0x8, 0x8); | ||
2907 | } | 2909 | } |
2908 | 2910 | ||
2909 | if (rt5670->pdata.jd_mode) { | 2911 | if (rt5670->pdata.jd_mode) { |