All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Chuanxiao Dong <chuanxiao.dong@intel.com>
Cc: "chris@printf.org" <chris@printf.org>,
	linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH V2] mmc: sdhci: check 1.2v IO capability for SDHC host
Date: Wed, 3 Sep 2014 09:25:49 +0200	[thread overview]
Message-ID: <CAPDyKFr4k47-OuUwYFXziP=teiDizuP6Lv8uJ_MPLufFmbJiww@mail.gmail.com> (raw)
In-Reply-To: <20140819030240.GA3201@intel.com>

On 19 August 2014 05:02, Chuanxiao Dong <chuanxiao.dong@intel.com> wrote:
> Right now enable 1.2v IO voltage for SDHC is by using vqmmc.
> Thus for the host which doesn't have vqmmc, or its vqmmc does
> not support 1.2v, directly use MMC_CAP2_HS200 may cause HS200
> failure.
>
> So needs to check if vqmmc is able to support 1.2v. If it does
> not support, disable 1.2v IO for HS200.
>
> Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>

Thanks! Applied for next!

Kind regards
Uffe

> ---
> Changelog V2: rebase this patch, and use IS_ERR to check vqmmc.
>
>  drivers/mmc/host/sdhci.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 4cc2ff9..a23738c 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -3009,8 +3009,13 @@ int sdhci_add_host(struct sdhci_host *host)
>                 /* SD3.0: SDR104 is supported so (for eMMC) the caps2
>                  * field can be promoted to support HS200.
>                  */
> -               if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_HS200))
> +               if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_HS200)) {
>                         mmc->caps2 |= MMC_CAP2_HS200;
> +                       if (IS_ERR(mmc->supply.vqmmc) ||
> +                                       !regulator_is_supported_voltage
> +                                       (mmc->supply.vqmmc, 1100000, 1300000))
> +                               mmc->caps2 &= ~MMC_CAP2_HS200_1_2V_SDR;
> +               }
>         } else if (caps[1] & SDHCI_SUPPORT_SDR50)
>                 mmc->caps |= MMC_CAP_UHS_SDR50;
>
> --
> 1.7.10.4
>

      parent reply	other threads:[~2014-09-03  7:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19  3:02 [PATCH V2] mmc: sdhci: check 1.2v IO capability for SDHC host Chuanxiao Dong
2014-08-19  5:14 ` Jaehoon Chung
2014-08-19  5:58   ` Dong, Chuanxiao
2014-09-03  7:25 ` Ulf Hansson [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='CAPDyKFr4k47-OuUwYFXziP=teiDizuP6Lv8uJ_MPLufFmbJiww@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=chris@printf.org \
    --cc=chuanxiao.dong@intel.com \
    --cc=linux-mmc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.