mmc: sdhci: UHS-II support, handle vdd2 in case of power-off
RFC PATCH v3 14/21 mmc: sdhci: UHS-II support, handle vdd2 in case of power-off
From: AKASHI Takahiro <[email protected]>
Configure a regulator for VDD2 in case of power-off.
Signed-off-by Ben Chuang <[email protected]>
Signed-off-by AKASHI Takahiro <[email protected]>
--- drivers/mmc/host/sdhci.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/mmc/host/sdhci.c +5 -0
@@ -2333,6 +2333,11 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)if (!IS_ERR (mmc->supply.vmmc) && ios->power_mode ==MMC_POWER_OFF )mmc_regulator_set_ocr (mmc, mmc->supply.vmmc,0 ); +if (IS_ENABLED (CONFIG_MMC_SDHCI_UHS2 ) && + host->mmc->caps &MMC_CAP_UHS2 && + !IS_ERR (mmc->supply.vmmc2) && + ios->power_mode ==MMC_POWER_OFF ) +mmc_regulator_set_ocr (mmc, mmc->supply.vmmc2,0 );return ; }
Signature · 1 line
2.27.0
Adrian Hunter
maintainerQuoted 15 lines · Ben Chuang
From: AKASHI Takahiro <[email protected]>
Configure a regulator for VDD2 in case of power-off.
Signed-off-by Ben Chuang <[email protected]>Signed-off-by AKASHI Takahiro <[email protected]>--- drivers/mmc/host/sdhci.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mmc/host/sdhci.c +0
-0
drivers/mmc/host/sdhci.c void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) · line 2339
Quoted 7 lines
drivers/mmc/host/sdhci.c +4
-0@@ -2333,6 +2333,11 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)if (!IS_ERR (mmc->supply.vmmc) && ios->power_mode ==MMC_POWER_OFF )mmc_regulator_set_ocr (mmc, mmc->supply.vmmc,0 ); +if (IS_ENABLED (CONFIG_MMC_SDHCI_UHS2 ) && + host->mmc->caps &MMC_CAP_UHS2 && + !IS_ERR (mmc->supply.vmmc2) && + ios->power_mode ==MMC_POWER_OFF )
Probably this can be just:
if (!IS_ERR_OR_NULL(mmc->supply.vmmc2) && ios->power_mode == MMC_POWER_OFF)
Quoted 5 lines
drivers/mmc/host/sdhci.c +1
-0+mmc_regulator_set_ocr (mmc, mmc->supply.vmmc2,0 );return ; }
Quoted 26 lines · Adrian Hunter
Quoted 15 lines · Ben Chuang
From: AKASHI Takahiro <[email protected]>
Configure a regulator for VDD2 in case of power-off.
Signed-off-by Ben Chuang <[email protected]>Signed-off-by AKASHI Takahiro <[email protected]>--- drivers/mmc/host/sdhci.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/mmc/host/sdhci.c +0
-0drivers/mmc/host/sdhci.c void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) · line 2339
Quoted 7 lines
drivers/mmc/host/sdhci.c +4
-0@@ -2333,6 +2333,11 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)if (!IS_ERR (mmc->supply.vmmc) && ios->power_mode ==MMC_POWER_OFF )mmc_regulator_set_ocr (mmc, mmc->supply.vmmc,0 ); +if (IS_ENABLED (CONFIG_MMC_SDHCI_UHS2 ) && + host->mmc->caps &MMC_CAP_UHS2 && + !IS_ERR (mmc->supply.vmmc2) && + ios->power_mode ==MMC_POWER_OFF )Probably this can be just:
Quoted 2 lines
if (!IS_ERR_OR_NULL(mmc->supply.vmmc2) && ios->power_mode == MMC_POWER_OFF)
Yeah, probably.
-Takahiro Akashi
Quoted 7 lines
Quoted 6 lines
drivers/mmc/host/sdhci.c +1
-0+mmc_regulator_set_ocr (mmc, mmc->supply.vmmc2,0 );return ; }