linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ben Chuang <benchuanggli@gmail.com>,
	ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, ben.chuang@genesyslogic.com.tw,
	greg.tu@genesyslogic.com.tw
Subject: Re: [RFC PATCH V3 14/21] mmc: sdhci: UHS-II support, handle vdd2 in case of power-off
Date: Tue, 15 Sep 2020 16:00:47 +0900	[thread overview]
Message-ID: <20200915070047.GF2860208@laputa> (raw)
In-Reply-To: <ef621382-b8b9-e8d2-cc54-3e6377050d5b@intel.com>

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;
> >  	}
> >  
> > 
> 

      reply	other threads:[~2020-09-15  7:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200915070047.GF2860208@laputa \
    --to=takahiro.akashi@linaro.org \
    --cc=adrian.hunter@intel.com \
    --cc=ben.chuang@genesyslogic.com.tw \
    --cc=benchuanggli@gmail.com \
    --cc=greg.tu@genesyslogic.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).