public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Matteo Facchinetti <matteo.facchinetti@sirius-es.it>
To: chris@printf.net, ulf.hansson@linaro.org
Cc: shc_work@mail.ru, s.hauer@pengutronix.de,
	peter.griffin@linaro.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, agust@denx.de, gsi@denx.de,
	sbabic@denx.de
Subject: Re: [PATCH v2 2/2] mmc: mxcmmc: fix the default value for available voltages into mxcmci_probe
Date: Mon, 27 Oct 2014 11:23:47 +0100	[thread overview]
Message-ID: <544E1D33.8060303@sirius-es.it> (raw)
In-Reply-To: <1412778273-13464-1-git-send-email-matteo.facchinetti@sirius-es.it>

This patch was reviewed, and seems that work it's complete.

Can you merge?


On 08/10/2014 16:24, Matteo Facchinetti wrote:
> From: Matteo Facchinetti <matteo.facchinetti@sirius-es.it>
>
> If available voltages are not given, mmc_regulator_get_supply() function
> returns 0 and mxcmmc driver doesn't set a value for ocr_avail mask.
>
> In accordance with the comment in platform_data/mmc-mxcmmc.h,
> fix it, assuming MMC_VDD_32_33 | MMC_VDD_33_34 as default value.
>
> Signed-off-by: Matteo Facchinetti <matteo.facchinetti@sirius-es.it>
> ---
> v2:
> * Add test to check if mmc->ocr_avail is setted by mmc_regulator_get_supply().
>    This will prevent that it be overwritten unconditionally.
> ---
>   drivers/mmc/host/mxcmmc.c | 12 +++++++-----
>   1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 536a898..5316d9b 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -1077,12 +1077,14 @@ static int mxcmci_probe(struct platform_device *pdev)
>   		dat3_card_detect = true;
>   
>   	ret = mmc_regulator_get_supply(mmc);
> -	if (ret) {
> -		if (pdata && ret != -EPROBE_DEFER)
> -			mmc->ocr_avail = pdata->ocr_avail ? :
> -				MMC_VDD_32_33 | MMC_VDD_33_34;
> +	if (ret == -EPROBE_DEFER)
> +		goto out_free;
> +
> +	if (!mmc->ocr_avail) {
> +		if (pdata && pdata->ocr_avail)
> +			mmc->ocr_avail = pdata->ocr_avail;
>   		else
> -			goto out_free;
> +			mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
>   	}
>   
>   	if (dat3_card_detect)

  parent reply	other threads:[~2014-10-27 10:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 14:24 [PATCH v2 2/2] mmc: mxcmmc: fix the default value for available voltages into mxcmci_probe Matteo Facchinetti
2014-10-10  7:51 ` Sascha Hauer
2014-10-27 10:23 ` Matteo Facchinetti [this message]
2014-10-27 12:12 ` Ulf Hansson

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=544E1D33.8060303@sirius-es.it \
    --to=matteo.facchinetti@sirius-es.it \
    --cc=agust@denx.de \
    --cc=chris@printf.net \
    --cc=gsi@denx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sbabic@denx.de \
    --cc=shc_work@mail.ru \
    --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