Hi Kever, This patch was not intended to be merged as-is, at least not with "DO NOT MERGE" in the subject.
An updated revision of this patch is part of the "Keep fixed/gpio regulator enable count in balance" series [2] and should be merged as part of that series. [2] https://patchwork.ozlabs.org/project/uboot/list/?series=364753 Regards, Jonas On 2023-07-31 08:52, Kever Yang wrote: > > On 2023/7/2 20:41, Jonas Karlman wrote: >> With the series "regulator: implement basic reference counter" [1], >> keeping regulator enablement in balance become more important. >> >> Disable vqmmc-supply before signal voltage is changed to keep regulator >> enable counter in balance. >> >> [1] https://patchwork.ozlabs.org/project/uboot/list/?series=351536 >> >> Signed-off-by: Jonas Karlman <jo...@kwiboo.se> > Reviewed-by: Kever Yang <kever.y...@rock-chips.com> > > Thanks, > - Kever >> --- >> drivers/mmc/dw_mmc.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c >> index 5085a3b491da..400066fa99a2 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