Skip to content

Commit f28906b

Browse files
Andy3Kuoasus-leslieyu
authored andcommitted
sd: enable vmmc supply for reboot
Mmc core has already power off the vmmc since shutdown, re-enable it so that card is active in next reboot. Change-Id: I0140ed92575f02535e0e3d64e0d7a2835448cba4
1 parent fbc24da commit f28906b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • drivers/mmc/core

drivers/mmc/core/sd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/slab.h>
1616
#include <linux/stat.h>
1717
#include <linux/pm_runtime.h>
18+
#include <linux/regulator/consumer.h>
1819

1920
#include <linux/mmc/host.h>
2021
#include <linux/mmc/card.h>
@@ -1198,6 +1199,10 @@ static int _mmc_sd_shutdown(struct mmc_host *host)
11981199
* running system image.
11991200
*/
12001201
if (host->restrict_caps & RESTRICT_CARD_TYPE_EMMC) {
1202+
if (!IS_ERR(host->supply.vmmc)){
1203+
err = regulator_enable(host->supply.vmmc);
1204+
pr_info("Enable SD card vmmc, err=%d\n", err);
1205+
}
12011206
host->ios.signal_voltage = MMC_SIGNAL_VOLTAGE_330;
12021207
host->ios.vdd = fls(host->ocr_avail) - 1;
12031208
mmc_regulator_set_vqmmc(host, &host->ios);

0 commit comments

Comments
 (0)