diff options
author | Fabio Porcedda <fabio.porcedda@gmail.com> | 2013-02-14 09:14:25 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-03-01 12:53:45 +0100 |
commit | c1fd5f6402050b2463d0610b94f050fedf1b5019 (patch) | |
tree | 7ff33e78c2a4f40b3465d163c03382db0d4d500f /drivers/watchdog/at91sam9_wdt.c | |
parent | 490ac7af8b71069ba0c733052c5f448ac070c947 (diff) |
watchdog: add timeout-sec property binding
this patchset add the timeout-sec property to the following drivers:
orion_wdt, pnx4008_wdt, s3c2410_wdt and at91sam9_wdt.
The at91sam9_wdt is tested on evk-pr3,
the other drivers are compile tested only.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/at91sam9_wdt.c')
-rw-r--r-- | drivers/watchdog/at91sam9_wdt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index 8038b20284ce..be37dde4f864 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c @@ -56,7 +56,7 @@ /* User land timeout */ #define WDT_HEARTBEAT 15 -static int heartbeat = WDT_HEARTBEAT; +static int heartbeat; module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. " "(default = " __MODULE_STRING(WDT_HEARTBEAT) ")"); @@ -176,6 +176,7 @@ static const struct watchdog_ops at91_wdt_ops = { static struct watchdog_device at91_wdt_dev = { .info = &at91_wdt_info, .ops = &at91_wdt_ops, + .timeout = WDT_HEARTBEAT, .min_timeout = 1, .max_timeout = 0xFFFF, }; @@ -194,8 +195,8 @@ static int __init at91wdt_probe(struct platform_device *pdev) return -ENOMEM; } - at91_wdt_dev.timeout = heartbeat; at91_wdt_dev.parent = &pdev->dev; + watchdog_init_timeout(&at91_wdt_dev, heartbeat, &pdev->dev); watchdog_set_nowayout(&at91_wdt_dev, nowayout); /* Set watchdog */ @@ -212,7 +213,7 @@ static int __init at91wdt_probe(struct platform_device *pdev) mod_timer(&at91wdt_private.timer, jiffies + WDT_TIMEOUT); pr_info("enabled (heartbeat=%d sec, nowayout=%d)\n", - heartbeat, nowayout); + at91_wdt_dev.timeout, nowayout); return 0; } |