mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
mmc: dw_mmc: Keep vqmmc-supply enable count in balance
With the commit 4fcba5d556
("regulator: implement basic reference
counter"), keeping regulator enablement in balance become more important.
Disable vqmmc-supply before signal voltage is changed to keep regulator
enable counter in balance.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
This commit is contained in:
parent
9a2e9cc659
commit
01b2917a19
1 changed files with 4 additions and 0 deletions
|
@ -509,6 +509,10 @@ static int dwmci_set_ios(struct mmc *mmc)
|
||||||
if (mmc->vqmmc_supply) {
|
if (mmc->vqmmc_supply) {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, false);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
|
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
|
||||||
regulator_set_value(mmc->vqmmc_supply, 1800000);
|
regulator_set_value(mmc->vqmmc_supply, 1800000);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue