File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
289299static int dw_mci_rockchip_suspend (struct device * dev )
290300{
@@ -308,6 +318,7 @@ static SIMPLE_DEV_PM_OPS(dw_mci_rockchip_pmops,
308318static 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 ,
You can’t perform that action at this time.
0 commit comments