1
0
Fork 0

watchdog: imx2_wdt: 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.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
5.4-rM2-2.2.x-imx-deep-sleep
Shawn Guo 2019-08-28 12:48:40 +02:00 committed by Alistair Francis
parent 539b322758
commit 34906fc690
1 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#include <linux/moduleparam.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/pinctrl/consumer.h>
#include <linux/regmap.h>
#include <linux/watchdog.h>
@ -378,6 +379,8 @@ static int imx2_wdt_suspend(struct device *dev)
clk_disable_unprepare(wdev->clk);
pinctrl_pm_select_sleep_state(dev);
return 0;
}
@ -388,6 +391,8 @@ static int imx2_wdt_resume(struct device *dev)
struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
int ret;
pinctrl_pm_select_default_state(dev);
ret = clk_prepare_enable(wdev->clk);
if (ret)
return ret;