aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt3
-rw-r--r--drivers/watchdog/watchdog_dev.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 2bdc6dc6e04c..abbcf2ce8f62 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -101,6 +101,9 @@ they are supported. These optional routines/operations are:
101 the watchdog timer driver core does: to send a keepalive ping to the watchdog 101 the watchdog timer driver core does: to send a keepalive ping to the watchdog
102 timer hardware it will either use the ping operation (when available) or the 102 timer hardware it will either use the ping operation (when available) or the
103 start operation (when the ping operation is not available). 103 start operation (when the ping operation is not available).
104 (Note: the WDIOC_KEEPALIVE ioctl call will only be active when the
105 WDIOF_KEEPALIVEPING bit has been set in the option field on the watchdog's
106 info structure).
104* status: this routine checks the status of the watchdog timer device. The 107* status: this routine checks the status of the watchdog timer device. The
105 status of the device is reported with watchdog WDIOF_* status flags/bits. 108 status of the device is reported with watchdog WDIOF_* status flags/bits.
106 109
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index 00a611293065..2fb4cecd50d8 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -120,6 +120,11 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
120 return put_user(val, p); 120 return put_user(val, p);
121 case WDIOC_GETBOOTSTATUS: 121 case WDIOC_GETBOOTSTATUS:
122 return put_user(wdd->bootstatus, p); 122 return put_user(wdd->bootstatus, p);
123 case WDIOC_KEEPALIVE:
124 if (!(wdd->info->options & WDIOF_KEEPALIVEPING))
125 return -EOPNOTSUPP;
126 watchdog_ping(wdd);
127 return 0;
123 default: 128 default:
124 return -ENOTTY; 129 return -ENOTTY;
125 } 130 }