diff options
author | Jonas Karlman <jonas@kwiboo.se> | 2023-07-19 21:21:00 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-11 13:36:26 -0400 |
commit | 7bfb565964e1fe115258f39560be6bfc60ba6353 (patch) | |
tree | 99340a83103530a83c49b59a9280cc833bd1bec3 | |
parent | c69afff6871d5d4d48d963ce3b1158d1fea56e61 (diff) | |
download | u-boot-WIP/2023-08-11-keep-fixed-gpio-regulator-count-in-balance.zip u-boot-WIP/2023-08-11-keep-fixed-gpio-regulator-count-in-balance.tar.gz u-boot-WIP/2023-08-11-keep-fixed-gpio-regulator-count-in-balance.tar.bz2 |
mmc: dw_mmc: Keep vqmmc-supply enable count in balanceWIP/2023-08-11-keep-fixed-gpio-regulator-count-in-balance
With the commit 4fcba5d556b4 ("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>
-rw-r--r-- | drivers/mmc/dw_mmc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 5085a3b..400066f 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -509,6 +509,10 @@ static int dwmci_set_ios(struct mmc *mmc) if (mmc->vqmmc_supply) { int ret; + ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, false); + if (ret) + return ret; + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) regulator_set_value(mmc->vqmmc_supply, 1800000); else |