diff options
author | Shane.Chien <shane.chien@mediatek.com> | 2020-11-10 10:31:31 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-11-10 14:24:45 +0000 |
commit | 64a70744b77898a15d7a5b2b4dc0fa9523a75cde (patch) | |
tree | 798e61c3274a0d225fde7e004755e8a36c907cf7 /sound/soc/codecs/mt6359.c | |
parent | 354e592a506cf565dd5ece755150f50d52b69050 (diff) | |
download | linux-64a70744b77898a15d7a5b2b4dc0fa9523a75cde.tar.gz linux-64a70744b77898a15d7a5b2b4dc0fa9523a75cde.tar.bz2 linux-64a70744b77898a15d7a5b2b4dc0fa9523a75cde.zip |
ASoC: Fix vaud18 power leakage of mt6359
vaud18 is power of mt6359 audio path. It
should only enable when audio is used,
instead of in boot up stage.
Once mt6359 audio path is enabled or disabled,
vaud18 is controlled by regulator supply widget
"LDO_VAUD18". Due to vaud18 is controlled by
regulator dapm macro instead of regmap, the macro
MT6359_LDO_VAUD18_CON0 and variable avdd_reg
is no used and removed from mt6359.h.
Signed-off-by: Shane.Chien <shane.chien@mediatek.com>
Link: https://lore.kernel.org/r/1604975492-6142-2-git-send-email-shane.chien@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/mt6359.c')
-rw-r--r-- | sound/soc/codecs/mt6359.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/sound/soc/codecs/mt6359.c b/sound/soc/codecs/mt6359.c index d20c59a87524..ecdfd5732075 100644 --- a/sound/soc/codecs/mt6359.c +++ b/sound/soc/codecs/mt6359.c @@ -1943,9 +1943,7 @@ static const struct snd_soc_dapm_widget mt6359_dapm_widgets[] = { SND_SOC_DAPM_SUPPLY_S("CLK_BUF", SUPPLY_SEQ_CLK_BUF, MT6359_DCXO_CW12, RG_XO_AUDIO_EN_M_SFT, 0, NULL, 0), - SND_SOC_DAPM_SUPPLY_S("LDO_VAUD18", SUPPLY_SEQ_LDO_VAUD18, - MT6359_LDO_VAUD18_CON0, - RG_LDO_VAUD18_EN_SFT, 0, NULL, 0), + SND_SOC_DAPM_REGULATOR_SUPPLY("LDO_VAUD18", 0, 0), SND_SOC_DAPM_SUPPLY_S("AUDGLB", SUPPLY_SEQ_AUD_GLB, MT6359_AUDDEC_ANA_CON13, RG_AUDGLB_PWRDN_VA32_SFT, 1, NULL, 0), @@ -2807,20 +2805,6 @@ static int mt6359_platform_driver_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, priv); priv->dev = &pdev->dev; - priv->avdd_reg = devm_regulator_get(&pdev->dev, "vaud18"); - if (IS_ERR(priv->avdd_reg)) { - dev_err(&pdev->dev, "%s(), have no vaud18 supply: %ld", - __func__, PTR_ERR(priv->avdd_reg)); - return PTR_ERR(priv->avdd_reg); - } - - ret = regulator_enable(priv->avdd_reg); - if (ret) { - dev_err(&pdev->dev, "%s(), failed to enable regulator!\n", - __func__); - return ret; - } - ret = mt6359_parse_dt(priv); if (ret) { dev_warn(&pdev->dev, "%s() failed to parse dts\n", __func__); @@ -2841,13 +2825,6 @@ static int mt6359_platform_driver_remove(struct platform_device *pdev) dev_dbg(&pdev->dev, "%s(), dev name %s\n", __func__, dev_name(&pdev->dev)); - ret = regulator_disable(priv->avdd_reg); - if (ret) { - dev_err(&pdev->dev, "%s(), failed to disable regulator!\n", - __func__); - return ret; - } - return 0; } |