Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1441383 > unrolled thread

[PATCH 2/2] mmc: dw_mmc: Print proper voltage on error

Started byKrzysztof Kozlowski <k.kozlowski@samsung.com>
First post2016-07-12 16:10 +0200
Last post2016-07-13 10:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/2] mmc: dw_mmc: Print proper voltage on error Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-12 16:10 +0200
    Re: [PATCH 2/2] mmc: dw_mmc: Print proper voltage on error Jaehoon Chung <jh80.chung@samsung.com> - 2016-07-13 03:40 +0200
      Re: [PATCH 2/2] mmc: dw_mmc: Print proper voltage on error Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-13 10:00 +0200

#1441383 — [PATCH 2/2] mmc: dw_mmc: Print proper voltage on error

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2016-07-12 16:10 +0200
Subject[PATCH 2/2] mmc: dw_mmc: Print proper voltage on error
Message-ID<rU6xR-5Z5-39@gated-at.bofh.it>
The commit 97f659a2e972 ("mmc: dw_mmc: prevent to set the wrong
value") reordered the code so the 'uhs' variable used in
mmc_regulator_set_vqmmc() error message is always 0 at that time thus
always printing 3.3 voltage.  Instead use value obtained from ios in
printed error message.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c2a128628b31..7de561065003 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1416,8 +1416,8 @@ static int dw_mci_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios)
 	ret = mmc_regulator_set_vqmmc(mmc, ios);
 	if (ret) {
 		dev_err(&mmc->class_dev,
-				 "Regulator set error %d - %s V\n",
-				 ret, uhs & v18 ? "1.8" : "3.3");
+				 "Regulator set error %d - %s\n",
+				 ret, mmc_voltage_to_str(ios));
 		return ret;
 	}
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1441950

FromJaehoon Chung <jh80.chung@samsung.com>
Date2016-07-13 03:40 +0200
Message-ID<rUhjz-4ys-1@gated-at.bofh.it>
In reply to#1441383
Hi Krzysztof,

On 07/12/2016 11:08 PM, Krzysztof Kozlowski wrote:
> The commit 97f659a2e972 ("mmc: dw_mmc: prevent to set the wrong
> value") reordered the code so the 'uhs' variable used in
> mmc_regulator_set_vqmmc() error message is always 0 at that time thus
> always printing 3.3 voltage.  Instead use value obtained from ios in
> printed error message.

The commit 97f659a2e972 was dropped because some board didn't work fine.
Some boards didn't use the vqmmc suppy and not defined into device-tree.

It's short time to fix. I will re-send the patch on next.
At that time, i will check this patch.

Best Regards,
Jaehoon Chung

> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index c2a128628b31..7de561065003 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1416,8 +1416,8 @@ static int dw_mci_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios)
>  	ret = mmc_regulator_set_vqmmc(mmc, ios);
>  	if (ret) {
>  		dev_err(&mmc->class_dev,
> -				 "Regulator set error %d - %s V\n",
> -				 ret, uhs & v18 ? "1.8" : "3.3");
> +				 "Regulator set error %d - %s\n",
> +				 ret, mmc_voltage_to_str(ios));
>  		return ret;
>  	}
>  
> 

[toc] | [prev] | [next] | [standalone]


#1442136

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2016-07-13 10:00 +0200
Message-ID<rUnfk-8tL-23@gated-at.bofh.it>
In reply to#1441950
On 07/13/2016 03:35 AM, Jaehoon Chung wrote:
> Hi Krzysztof,
> 
> On 07/12/2016 11:08 PM, Krzysztof Kozlowski wrote:
>> The commit 97f659a2e972 ("mmc: dw_mmc: prevent to set the wrong
>> value") reordered the code so the 'uhs' variable used in
>> mmc_regulator_set_vqmmc() error message is always 0 at that time thus
>> always printing 3.3 voltage.  Instead use value obtained from ios in
>> printed error message.
> 
> The commit 97f659a2e972 was dropped because some board didn't work fine.
> Some boards didn't use the vqmmc suppy and not defined into device-tree.
> 
> It's short time to fix. I will re-send the patch on next.
> At that time, i will check this patch.

Ah, okay. If 97f659a2e972 is dropped, there is no need for this patchset.

Best regards,
Krzysztof

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web