diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-12-09 17:26:53 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2020-02-09 22:39:00 +0100 |
commit | 4c08bc0b292ac510334f95c0a88b9f0d38c19567 (patch) | |
tree | 8946ffd70dccb15cb9725a388ddfeefef4456401 | |
parent | 3af28a4e6d92080bdeda9b0d88f2b18d9ffdc23b (diff) |
watchdog: imx8_wdt: improve help and logging
Improve module help messages and logging operations
in debug mode.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
-rw-r--r-- | drivers/watchdog/imx8_wdt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/watchdog/imx8_wdt.c b/drivers/watchdog/imx8_wdt.c index 50e4aba59d60..357e49e57e82 100644 --- a/drivers/watchdog/imx8_wdt.c +++ b/drivers/watchdog/imx8_wdt.c @@ -35,7 +35,8 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" static unsigned int timeout = DEFAULT_TIMEOUT; module_param(timeout, uint, 0000); -MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default=" +MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds 1<= timeout <=" + __MODULE_STRING(MAX_TIMEOUT) " (default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); static struct watchdog_device imx8_wdd; @@ -73,6 +74,8 @@ static int imx8_wdt_start(struct watchdog_device *wdog) if (res.a0) return res.a0; + dev_dbg(wdog->parent, "Watchdog started\n"); + return 0; } @@ -83,6 +86,8 @@ static int imx8_wdt_stop(struct watchdog_device *wdog) arm_smccc_smc(FSL_SIP_SRTC, FSL_SIP_SRTC_STOP_WDOG, 0, 0, 0, 0, 0, 0, &res); + dev_dbg(wdog->parent, "Watchdog stopped\n"); + return res.a0; } @@ -96,6 +101,8 @@ static int imx8_wdt_set_timeout(struct watchdog_device *wdog, arm_smccc_smc(FSL_SIP_SRTC, FSL_SIP_SRTC_SET_TIMEOUT_WDOG, timeout * 1000, 0, 0, 0, 0, 0, &res); + dev_dbg(wdog->parent, "Set timeout to %d seconds\n", timeout); + return res.a0; } @@ -113,6 +120,8 @@ static int imx8_wdt_set_pretimeout(struct watchdog_device *wdog, (wdog->timeout - new_pretimeout) * 1000, 0, 0, 0, 0, 0, &res); + dev_dbg(wdog->parent, "Set pretimeout to %d seconds\n", new_pretimeout); + return res.a0; } |