diff options
Diffstat (limited to 'Documentation/watchdog/watchdog-kernel-api.txt')
-rw-r--r-- | Documentation/watchdog/watchdog-kernel-api.txt | 14 |
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 @@ | |||
1 | The Linux WatchDog Timer Driver Core kernel API. | 1 | The Linux WatchDog Timer Driver Core kernel API. |
2 | =============================================== | 2 | =============================================== |
3 | Last reviewed: 22-May-2012 | 3 | Last reviewed: 12-Feb-2013 |
4 | 4 | ||
5 | Wim Van Sebroeck <wim@iguana.be> | 5 | Wim Van Sebroeck <wim@iguana.be> |
6 | 6 | ||
@@ -212,3 +212,15 @@ driver specific data to and a pointer to the data itself. | |||
212 | The watchdog_get_drvdata function allows you to retrieve driver specific data. | 212 | The watchdog_get_drvdata function allows you to retrieve driver specific data. |
213 | The argument of this function is the watchdog device where you want to retrieve | 213 | The argument of this function is the watchdog device where you want to retrieve |
214 | data from. The function returns the pointer to the driver specific data. | 214 | data from. The function returns the pointer to the driver specific data. |
215 | |||
216 | To initialize the timeout field, the following function can be used: | ||
217 | |||
218 | extern int watchdog_init_timeout(struct watchdog_device *wdd, | ||
219 | unsigned int timeout_parm, struct device *dev); | ||
220 | |||
221 | The watchdog_init_timeout function allows you to initialize the timeout field | ||
222 | using the module timeout parameter or by retrieving the timeout-sec property from | ||
223 | the device tree (if the module timeout parameter is invalid). Best practice is | ||
224 | to set the default timeout value as timeout value in the watchdog_device and | ||
225 | then use this function to set the user "preferred" timeout value. | ||
226 | This routine returns zero on success and a negative errno code for failure. | ||