Skip to contentSkip to conversation

mmc: mmc: correct the logic for setting HS400ES signal voltage

PATCH Applied Haibo Chen 3 participants 3 messages Aug 8, 2017

Subsystems (2)
lore
Share & tools
lore

Haibo Chen

author
#0 lore raw

PATCH v2 1/1 mmc: mmc: correct the logic for setting HS400ES signal voltage

Change the default err value to -EINVAL, make sure the card only has type EXT_CSD_CARD_TYPE_HS400_1_8V also do the signal voltage setting when select hs400es mode.

Fixes commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")
---
 drivers/mmc/core/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c +1 -1
index 30a13f0..83d9468 100644
@@ -1289,7 +1289,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
 static int mmc_select_hs400es(struct mmc_card *card)
 {
 	struct mmc_host *host = card->host;
-	int err = 0;
+	int err = -EINVAL;
 	u8 val;
 
 	if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
Signature · 1 line
1.9.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 4 lines · Haibo Chen

Change the default err value to -EINVAL, make sure the card only has type EXT_CSD_CARD_TYPE_HS400_1_8V also do the signal voltage setting when select hs400es mode.

Quoted 21 lines
Fixes commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")
---
  drivers/mmc/core/mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c +1 -1
index 30a13f0..83d9468 100644
@@ -1289,7 +1289,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
  static int mmc_select_hs400es(struct mmc_card *card)
  {
  	struct mmc_host *host = card->host;
-	int err = 0;
+	int err = -EINVAL;
  	u8 val;
 
  	if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
Applied
#2 lore raw
In reply to Haibo Chen
Quoted 7 lines · Haibo Chen

Change the default err value to -EINVAL, make sure the card only has type EXT_CSD_CARD_TYPE_HS400_1_8V also do the signal voltage setting when select hs400es mode.

Fixes commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")

Thanks, applied for fixes!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/core/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c +1 -2
index 30a13f0..83d9468 100644
@@ -1289,7 +1289,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
 static int mmc_select_hs400es(struct mmc_card *card)
 {
        struct mmc_host *host = card->host;
-       int err = 0;
+       int err = -EINVAL;
        u8 val;
 
        if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
--

1.9.1