mmc: mmc: correct the logic for setting HS400ES signal voltage
Subsystems (2)
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")
Cc <[email protected]>
Signed-off-by Haibo Chen <[email protected]>
--- drivers/mmc/core/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c +1 -1
@@ -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
Quoted 4 lines · Haibo Chen
Change the default err value to
-EINVAL, make sure the card only has typeEXT_CSD_CARD_TYPE_HS400_1_8Valso do the signal voltage setting when select hs400es mode.
Reviewed-by Shawn Lin <[email protected]>
Quoted 21 lines
Fixes commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")Cc <[email protected]>Signed-off-by Haibo Chen <[email protected]>--- drivers/mmc/core/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/core/mmc.c +1
-1@@ -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 )) {
Ulf Hansson
AppliedQuoted 7 lines · Haibo Chen
Change the default err value to
-EINVAL, make sure the card only has typeEXT_CSD_CARD_TYPE_HS400_1_8Valso do the signal voltage setting when select hs400es mode.Fixes commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")Cc <[email protected]>Signed-off-by Haibo Chen <[email protected]>
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@@ -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