mmc: pwrseq_simple: select pinctrl state during suspend/resume
To support suspend/resume from LPSR mode, we need to select default pinctrl state in resume, so that IOMUXC settings can be restored from power losing. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>5.4-rM2-2.2.x-imx-deep-sleep
parent
34906fc690
commit
991d5b4eda
|
@ -15,6 +15,7 @@
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/gpio/consumer.h>
|
#include <linux/gpio/consumer.h>
|
||||||
|
#include <linux/pinctrl/consumer.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/property.h>
|
#include <linux/property.h>
|
||||||
|
|
||||||
|
@ -151,12 +152,30 @@ static int mmc_pwrseq_simple_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mmc_pwrseq_simple_suspend(struct device *dev)
|
||||||
|
{
|
||||||
|
pinctrl_pm_select_sleep_state(dev);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int mmc_pwrseq_simple_resume(struct device *dev)
|
||||||
|
{
|
||||||
|
pinctrl_pm_select_default_state(dev);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMPLE_DEV_PM_OPS(mmc_pwrseq_simple_pm_ops, mmc_pwrseq_simple_suspend,
|
||||||
|
mmc_pwrseq_simple_resume);
|
||||||
|
|
||||||
static struct platform_driver mmc_pwrseq_simple_driver = {
|
static struct platform_driver mmc_pwrseq_simple_driver = {
|
||||||
.probe = mmc_pwrseq_simple_probe,
|
.probe = mmc_pwrseq_simple_probe,
|
||||||
.remove = mmc_pwrseq_simple_remove,
|
.remove = mmc_pwrseq_simple_remove,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "pwrseq_simple",
|
.name = "pwrseq_simple",
|
||||||
.of_match_table = mmc_pwrseq_simple_of_match,
|
.of_match_table = mmc_pwrseq_simple_of_match,
|
||||||
|
.pm = &mmc_pwrseq_simple_pm_ops,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue