diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-05-02 13:44:41 +0300 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-05-02 13:44:41 +0300 |
commit | 7c818328b76d9d43164fef14bbdf8cf40eee2d2c (patch) | |
tree | b6576786883f7178bea380c4037f6dd8b0e61985 /sound/soc | |
parent | 047e8dd968015d6fbcae4fded5313c741952ef68 (diff) |
ASoC: sgtl5000: Don't fallback to ldo regulator
- the code to fallback to internal ldo regulator instead of external
vddd is completely wrong. According to TDM and Errata of sgtl5000
chips revision < 0x11 strongly need to use external vddd due to ER1.
For chips revision >= 0x11 there is no limitation to use either
external vddd or internal ldo regulator.
- fix logical error in cleanup sequence.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 07fe76c8cc8d..dd07286a79c3 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1261,31 +1261,6 @@ static int sgtl5000_enable_regulators(struct snd_soc_codec *codec) rev = (reg & SGTL5000_REVID_MASK) >> SGTL5000_REVID_SHIFT; dev_info(codec->dev, "sgtl5000 revision 0x%x\n", rev); - /* - * workaround for revision 0x11 and later, - * roll back to use internal LDO - */ - if (external_vddd && rev >= 0x11) { - /* disable all regulator first */ - regulator_bulk_disable(ARRAY_SIZE(sgtl5000->supplies), - sgtl5000->supplies); - /* free VDDD regulator */ - regulator_bulk_free(ARRAY_SIZE(sgtl5000->supplies), - sgtl5000->supplies); - - ret = sgtl5000_replace_vddd_with_ldo(codec); - if (ret) - return ret; - - ret = regulator_bulk_enable(ARRAY_SIZE(sgtl5000->supplies), - sgtl5000->supplies); - if (ret) - goto err_regulator_free; - - /* wait for all power rails bring up */ - udelay(10); - } - return 0; err_regulator_disable: @@ -1294,7 +1269,7 @@ err_regulator_disable: err_regulator_free: regulator_bulk_free(ARRAY_SIZE(sgtl5000->supplies), sgtl5000->supplies); - if (external_vddd) + if (! external_vddd) ldo_regulator_remove(codec); return ret; |