watchdog: imx2_wdt: Improve power management support.
authorXiubo Li <Li.Xiubo@freescale.com>
Thu, 16 Oct 2014 03:44:15 +0000 (11:44 +0800)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 21 Jan 2015 13:45:16 +0000 (14:45 +0100)
commitbbd5900935be8755b6344386373174b20cd474a2
tree5a1d70c25a6c46e08dd578a9222971ea93e9adb2
parentec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc
watchdog: imx2_wdt: Improve power management support.

Improve power management operations(suspend and resume) as part of
dev_pm_ops for IMX2 watchdog driver.

If PM will be supported, please make sure that the wdev->clk
could disable the watchdog's counter input clock source or can
mask watchdog's reset request to the core.

If watchdog is still used by consumers and resumes from deep
sleep state, we need to restart the watchdog again without
enabling the timer.

If watchdog been has started --> stopped by the consumers and
resumes from non-deep sleep state, then start the timer again.

If watchdog has been started --> stopped by the consumers and
resumes from deep sleep state, will do nothing. The watchdog
will be restarted by consumers next time to be used.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/imx2_wdt.c