* [RFC PATCH V3 14/21] mmc: sdhci: UHS-II support, handle vdd2 in case of power-off
@ 2020-07-10 11:11 Ben Chuang
2020-08-21 14:09 ` Adrian Hunter
0 siblings, 1 reply; 3+ messages in thread
From: Ben Chuang @ 2020-07-10 11:11 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson
Cc: linux-mmc, linux-kernel, ben.chuang, takahiro.akashi, greg.tu,
Ben Chuang
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Configure a regulator for VDD2 in case of power-off.
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
drivers/mmc/host/sdhci.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 7f2537648a08..d38d734ec83f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -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;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH V3 14/21] mmc: sdhci: UHS-II support, handle vdd2 in case of power-off
2020-07-10 11:11 [RFC PATCH V3 14/21] mmc: sdhci: UHS-II support, handle vdd2 in case of power-off Ben Chuang
@ 2020-08-21 14:09 ` Adrian Hunter
2020-09-15 7:00 ` AKASHI Takahiro
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2020-08-21 14:09 UTC (permalink / raw)
To: Ben Chuang, ulf.hansson
Cc: linux-mmc, linux-kernel, ben.chuang, takahiro.akashi, greg.tu
On 10/07/20 2:11 pm, Ben Chuang wrote:
> From: AKASHI Takahiro <takahiro.akashi@linaro.org>
>
> Configure a regulator for VDD2 in case of power-off.
>
> Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
> drivers/mmc/host/sdhci.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 7f2537648a08..d38d734ec83f 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -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)
> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc2, 0);
> return;
> }
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH V3 14/21] mmc: sdhci: UHS-II support, handle vdd2 in case of power-off
2020-08-21 14:09 ` Adrian Hunter
@ 2020-09-15 7:00 ` AKASHI Takahiro
0 siblings, 0 replies; 3+ messages in thread
From: AKASHI Takahiro @ 2020-09-15 7:00 UTC (permalink / raw)
To: Adrian Hunter
Cc: Ben Chuang, ulf.hansson, linux-mmc, linux-kernel, ben.chuang,
greg.tu
On Fri, Aug 21, 2020 at 05:09:55PM +0300, Adrian Hunter wrote:
> On 10/07/20 2:11 pm, Ben Chuang wrote:
> > From: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >
> > Configure a regulator for VDD2 in case of power-off.
> >
> > Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> > drivers/mmc/host/sdhci.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index 7f2537648a08..d38d734ec83f 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -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)
Yeah, probably.
-Takahiro Akashi
>
> > + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc2, 0);
> > return;
> > }
> >
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-15 7:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-10 11:11 [RFC PATCH V3 14/21] mmc: sdhci: UHS-II support, handle vdd2 in case of power-off Ben Chuang
2020-08-21 14:09 ` Adrian Hunter
2020-09-15 7:00 ` AKASHI Takahiro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox