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-06 11:58:58 +0300 |
commit | cd24975f9aa05f4544ff92deacf2fc8f173262d0 (patch) | |
tree | a62f42cd28f4451712b6df4f2d698e95426f5de5 | |
parent | e0761d2fa3b9b0a43bc7ee1f50f71adfb0ba78eb (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>
-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 d8a87ed28372..27d6cf04169c 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1270,37 +1270,12 @@ static int sgtl5000_enable_regulators(struct snd_soc_codec *codec) /* wait for all power rails bring up */ udelay(10); - /* - * workaround for revision 0x11 and later, - * roll back to use internal LDO - */ - if (external_vddd && sgtl5000->revision >= 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_free: regulator_bulk_free(ARRAY_SIZE(sgtl5000->supplies), sgtl5000->supplies); - if (external_vddd) + if (! external_vddd) ldo_regulator_remove(codec); return ret; |