watchdog: imx2_wdt: Add power management support.
Guenter Roeck
maintainerQuoted 18 lines · Xiubo Li
Add power management operations(suspend and resume) as part of
dev_pm_opsfor IMX2 watchdog driver.Signed-off-by Xiubo Li <[email protected]>--- drivers/watchdog/imx2_wdt.c | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+)drivers/watchdog/imx2_wdt.c +2
-0@@ -295,6 +295,52 @@ static void imx2_wdt_shutdown(struct platform_device *pdev) } } +#ifdef CONFIG_PM_SLEEP +/* Disable watchdog if it is active during suspend */
drivers/watchdog/imx2_wdt.c static void imx2_wdt_shutdown(struct platform_device *pdev) · line 309
Quoted 10 lines
drivers/watchdog/imx2_wdt.c +10
-0+static int imx2_wdt_suspend (struct device *dev) +{ +struct watchdog_device *wdog =dev_get_drvdata (dev); +struct imx2_wdt_device *wdev =watchdog_get_drvdata (wdog); + +imx2_wdt_set_timeout (wdog,IMX2_WDT_MAX_TIME ); +imx2_wdt_ping (wdog); + +/* Watchdog has been stopped but IP block is still running */ +if (!watchdog_active (&wdog) &&imx2_wdt_is_running (wdev))
Turns out this has a bug.
s/&wdog/wdog/
Please resubmit.
Thanks,
Guenter
Quoted 36 lines
Subject: Re: [PATCH] watchdog:
imx2_wdt: Add power management support.Quoted 6 lines · Xiubo Li
Add power management operations(suspend and resume) as part of
dev_pm_opsfor IMX2 watchdog driver.Signed-off-by Xiubo Li <[email protected]>--- drivers/watchdog/imx2_wdt.c | 47+++++++++++++++++++++++++++++++++++++++++++++
drivers/watchdog/imx2_wdt.c static void imx2_wdt_shutdown(struct platform_device
Quoted 7 lines
1 file changed, 47 insertions(+)drivers/watchdog/imx2_wdt.c +0
-0@@ -295,6 +295,52 @@ static void imx2_wdt_shutdown(struct platform_device*pdev)
Quoted 5 lines
drivers/watchdog/imx2_wdt.c +2
-0} } +#ifdef CONFIG_PM_SLEEP +/* Disable watchdog if it is active during suspend */ drivers/watchdog/imx2_wdt.c static void imx2_wdt_shutdown(struct platform_device · line 309
Quoted 10 lines
drivers/watchdog/imx2_wdt.c +10
-0+static int imx2_wdt_suspend (struct device *dev) +{ +struct watchdog_device *wdog =dev_get_drvdata (dev); +struct imx2_wdt_device *wdev =watchdog_get_drvdata (wdog); + +imx2_wdt_set_timeout (wdog,IMX2_WDT_MAX_TIME ); +imx2_wdt_ping (wdog); + +/* Watchdog has been stopped but IP block is still running */ +if (!watchdog_active (&wdog) &&imx2_wdt_is_running (wdev))Turns out this has a bug.
Quoted 4 lines
s/&wdog/wdog/
Please resubmit.
Found lost one commit about fixing this and other comments.
Thanks,
BRs
Quoted 6 lines
Thanks,
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html