Commit c2dc00e4 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

watchdog: WatchDog Timer Driver Core - Add WDIOC_KEEPALIVE ioctl

This part add's the WDIOC_KEEPALIVE ioctl functionality to the
WatchDog Timer Driver Core framework. Please note that the
WDIOF_KEEPALIVEPING bit has to be set in the watchdog_info
options field.
Signed-off-by: default avatarAlan Cox <>
Signed-off-by: default avatarWim Van Sebroeck <>
Acked-by: default avatarArnd Bergmann <>
Acked-by: default avatarWolfram Sang <>
parent 2fa03560
......@@ -101,6 +101,9 @@ they are supported. These optional routines/operations are:
the watchdog timer driver core does: to send a keepalive ping to the watchdog
timer hardware it will either use the ping operation (when available) or the
start operation (when the ping operation is not available).
(Note: the WDIOC_KEEPALIVE ioctl call will only be active when the
WDIOF_KEEPALIVEPING bit has been set in the option field on the watchdog's
info structure).
* status: this routine checks the status of the watchdog timer device. The
status of the device is reported with watchdog WDIOF_* status flags/bits.
......@@ -120,6 +120,11 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
return put_user(val, p);
return put_user(wdd->bootstatus, p);
if (!(wdd->info->options & WDIOF_KEEPALIVEPING))
return 0;
return -ENOTTY;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment