Skip to content

Commit 6d5f884

Browse files
Ziyuan Xuwzyy2
authored andcommitted
MINIARM: HACK: switch vccio_sd to 3.3v while shutdowning
Change-Id: I80d6d2b61b31f16b6b42b9ffcaab077231a7a91c Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
1 parent df4c9be commit 6d5f884

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

drivers/mmc/host/dw_mmc-rockchip.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/mmc/host.h>
1414
#include <linux/mmc/dw_mmc.h>
1515
#include <linux/of_address.h>
16+
#include <linux/regulator/consumer.h>
1617
#include <linux/slab.h>
1718

1819
#include "dw_mmc.h"
@@ -285,6 +286,15 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
285286
return dw_mci_pltfm_register(pdev, drv_data);
286287
}
287288

289+
static void dw_mci_rockchip_platfm_shutdown(struct platform_device *pdev)
290+
{
291+
struct dw_mci *host = platform_get_drvdata(pdev);
292+
struct mmc_host *mmc = host->cur_slot->mmc;
293+
294+
if (!IS_ERR(mmc->supply.vqmmc))
295+
regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
296+
}
297+
288298
#ifdef CONFIG_PM_SLEEP
289299
static int dw_mci_rockchip_suspend(struct device *dev)
290300
{
@@ -308,6 +318,7 @@ static SIMPLE_DEV_PM_OPS(dw_mci_rockchip_pmops,
308318
static struct platform_driver dw_mci_rockchip_pltfm_driver = {
309319
.probe = dw_mci_rockchip_probe,
310320
.remove = dw_mci_pltfm_remove,
321+
.shutdown = dw_mci_rockchip_platfm_shutdown,
311322
.driver = {
312323
.name = "dwmmc_rockchip",
313324
.of_match_table = dw_mci_rockchip_match,

0 commit comments

Comments
 (0)