Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/cpupowerutils
[firefly-linux-kernel-4.4.55.git] / include / linux / watchdog.h
index e9881ca2452bb858b5f57bfc47315303949bfa3d..111843f88b2a97dc87434631335ab95b6e786b45 100644 (file)
@@ -70,6 +70,7 @@ struct watchdog_device;
  * @ping:      The routine that sends a keepalive ping to the watchdog device.
  * @status:    The routine that shows the status of the watchdog device.
  * @set_timeout:The routine for setting the watchdog devices timeout value.
+ * @ioctl:     The routines that handles extra ioctl calls.
  *
  * The watchdog_ops structure contains a list of low-level operations
  * that control a watchdog device. It also contains the module that owns
@@ -85,6 +86,7 @@ struct watchdog_ops {
        int (*ping)(struct watchdog_device *);
        unsigned int (*status)(struct watchdog_device *);
        int (*set_timeout)(struct watchdog_device *, unsigned int);
+       long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
 };
 
 /** struct watchdog_device - The structure that defines a watchdog device
@@ -93,6 +95,8 @@ struct watchdog_ops {
  * @ops:       Pointer to the list of watchdog operations.
  * @bootstatus:        Status of the watchdog device at boot.
  * @timeout:   The watchdog devices timeout value.
+ * @min_timeout:The watchdog devices minimum timeout value.
+ * @max_timeout:The watchdog devices maximum timeout value.
  * @driver-data:Pointer to the drivers private data.
  * @status:    Field that contains the devices internal status bits.
  *
@@ -107,12 +111,15 @@ struct watchdog_device {
        const struct watchdog_ops *ops;
        unsigned int bootstatus;
        unsigned int timeout;
+       unsigned int min_timeout;
+       unsigned int max_timeout;
        void *driver_data;
        unsigned long status;
 /* Bit numbers for status flags */
 #define WDOG_ACTIVE            0       /* Is the watchdog running/active */
 #define WDOG_DEV_OPEN          1       /* Opened via /dev/watchdog ? */
 #define WDOG_ALLOW_RELEASE     2       /* Did we receive the magic char ? */
+#define WDOG_NO_WAY_OUT                3       /* Is 'nowayout' feature set ? */
 };
 
 /* Use the following functions to manipulate watchdog driver specific data */