aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog
diff options
context:
space:
mode:
authorFabio Porcedda <fabio.porcedda@gmail.com>2013-01-08 05:04:10 -0500
committerWim Van Sebroeck <wim@iguana.be>2013-03-01 06:48:36 -0500
commit3048253ed957fc6cdc34599178408559aa1e0062 (patch)
tree2e8fd94c3d64899dc4a48912f7ece62721047c68 /Documentation/watchdog
parente3e83d0001a77cdb337be9170e58b55488835ba0 (diff)
watchdog: core: dt: add support for the timeout-sec dt property
Add support for watchdog drivers to initialize/set the timeout field of the watchdog_device structure. The timeout field is initialised either with the module timeout parameter value (if valid) or with the timeout-sec dt property (if valid). If both are invalid the initial value is unchanged. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'Documentation/watchdog')
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 086638f6c82d..a0438f3957ca 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -1,6 +1,6 @@
1The Linux WatchDog Timer Driver Core kernel API. 1The Linux WatchDog Timer Driver Core kernel API.
2=============================================== 2===============================================
3Last reviewed: 22-May-2012 3Last reviewed: 12-Feb-2013
4 4
5Wim Van Sebroeck <wim@iguana.be> 5Wim Van Sebroeck <wim@iguana.be>
6 6
@@ -212,3 +212,15 @@ driver specific data to and a pointer to the data itself.
212The watchdog_get_drvdata function allows you to retrieve driver specific data. 212The watchdog_get_drvdata function allows you to retrieve driver specific data.
213The argument of this function is the watchdog device where you want to retrieve 213The argument of this function is the watchdog device where you want to retrieve
214data from. The function returns the pointer to the driver specific data. 214data from. The function returns the pointer to the driver specific data.
215
216To initialize the timeout field, the following function can be used:
217
218extern int watchdog_init_timeout(struct watchdog_device *wdd,
219 unsigned int timeout_parm, struct device *dev);
220
221The watchdog_init_timeout function allows you to initialize the timeout field
222using the module timeout parameter or by retrieving the timeout-sec property from
223the device tree (if the module timeout parameter is invalid). Best practice is
224to set the default timeout value as timeout value in the watchdog_device and
225then use this function to set the user "preferred" timeout value.
226This routine returns zero on success and a negative errno code for failure.