aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2012-03-16 04:14:00 -0400
committerWim Van Sebroeck <wim@iguana.be>2012-03-27 14:15:37 -0400
commitfd7b673c92731fc6c0b1e999adfd87b6762ee797 (patch)
tree35fafd733a2846acb1dd7a06cb7078a7fe59086f /Documentation/watchdog
parent2ca1606359695cc7ce371c7829c4082d9095fc06 (diff)
watchdog: Add support for WDIOC_GETTIMELEFT IOCTL in watchdog core
This patch adds support for WDIOC_GETTIMELEFT IOCTL in watchdog core. So, there is another function pointer added to struct watchdog_ops, which can be passed by drivers to support this IOCTL. Related documentation is updated too. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'Documentation/watchdog')
-rw-r--r--Documentation/watchdog/convert_drivers_to_kernel_api.txt4
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt4
2 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.txt b/Documentation/watchdog/convert_drivers_to_kernel_api.txt
index be8119bb15d2..271b8850dde7 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.txt
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.txt
@@ -59,6 +59,10 @@ Here is a overview of the functions and probably needed actions:
59 WDIOC_GETTIMEOUT: 59 WDIOC_GETTIMEOUT:
60 No preparations needed 60 No preparations needed
61 61
62 WDIOC_GETTIMELEFT:
63 It needs get_timeleft() callback to be defined. Otherwise it
64 will return EOPNOTSUPP
65
62 Other IOCTLs can be served using the ioctl-callback. Note that this is mainly 66 Other IOCTLs can be served using the ioctl-callback. Note that this is mainly
63 intended for porting old drivers; new drivers should not invent private IOCTLs. 67 intended for porting old drivers; new drivers should not invent private IOCTLs.
64 Private IOCTLs are processed first. When the callback returns with 68 Private IOCTLs are processed first. When the callback returns with
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 7d9d1da762b6..227f6cd0e5fa 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: 29-Nov-2011 3Last reviewed: 16-Mar-2012
4 4
5Wim Van Sebroeck <wim@iguana.be> 5Wim Van Sebroeck <wim@iguana.be>
6 6
@@ -77,6 +77,7 @@ struct watchdog_ops {
77 int (*ping)(struct watchdog_device *); 77 int (*ping)(struct watchdog_device *);
78 unsigned int (*status)(struct watchdog_device *); 78 unsigned int (*status)(struct watchdog_device *);
79 int (*set_timeout)(struct watchdog_device *, unsigned int); 79 int (*set_timeout)(struct watchdog_device *, unsigned int);
80 unsigned int (*get_timeleft)(struct watchdog_device *);
80 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); 81 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
81}; 82};
82 83
@@ -123,6 +124,7 @@ they are supported. These optional routines/operations are:
123 because the watchdog does not necessarily has a 1 second resolution). 124 because the watchdog does not necessarily has a 1 second resolution).
124 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the 125 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the
125 watchdog's info structure). 126 watchdog's info structure).
127* get_timeleft: this routines returns the time that's left before a reset.
126* ioctl: if this routine is present then it will be called first before we do 128* ioctl: if this routine is present then it will be called first before we do
127 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD 129 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD
128 if a command is not supported. The parameters that are passed to the ioctl 130 if a command is not supported. The parameters that are passed to the ioctl