lkml.org 
[lkml]   [2020]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH V3 14/21] mmc: sdhci: UHS-II support, handle vdd2 in case of power-off
Date
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;
> }
>
>

\
 
 \ /
  Last update: 2020-08-21 16:11    [W:2.046 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site