watchdog.h revision 96c1db7b9d601c31d103389cac074a6cce0d7633
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_WATCHDOG_H
20#define _UAPI_LINUX_WATCHDOG_H
21#include <linux/ioctl.h>
22#include <linux/types.h>
23#define WATCHDOG_IOCTL_BASE 'W'
24struct watchdog_info {
25  __u32 options;
26  __u32 firmware_version;
27  __u8 identity[32];
28};
29#define WDIOC_GETSUPPORT _IOR(WATCHDOG_IOCTL_BASE, 0, struct watchdog_info)
30#define WDIOC_GETSTATUS _IOR(WATCHDOG_IOCTL_BASE, 1, int)
31#define WDIOC_GETBOOTSTATUS _IOR(WATCHDOG_IOCTL_BASE, 2, int)
32#define WDIOC_GETTEMP _IOR(WATCHDOG_IOCTL_BASE, 3, int)
33#define WDIOC_SETOPTIONS _IOR(WATCHDOG_IOCTL_BASE, 4, int)
34#define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int)
35#define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int)
36#define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int)
37#define WDIOC_SETPRETIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 8, int)
38#define WDIOC_GETPRETIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 9, int)
39#define WDIOC_GETTIMELEFT _IOR(WATCHDOG_IOCTL_BASE, 10, int)
40#define WDIOF_UNKNOWN - 1
41#define WDIOS_UNKNOWN - 1
42#define WDIOF_OVERHEAT 0x0001
43#define WDIOF_FANFAULT 0x0002
44#define WDIOF_EXTERN1 0x0004
45#define WDIOF_EXTERN2 0x0008
46#define WDIOF_POWERUNDER 0x0010
47#define WDIOF_CARDRESET 0x0020
48#define WDIOF_POWEROVER 0x0040
49#define WDIOF_SETTIMEOUT 0x0080
50#define WDIOF_MAGICCLOSE 0x0100
51#define WDIOF_PRETIMEOUT 0x0200
52#define WDIOF_ALARMONLY 0x0400
53#define WDIOF_KEEPALIVEPING 0x8000
54#define WDIOS_DISABLECARD 0x0001
55#define WDIOS_ENABLECARD 0x0002
56#define WDIOS_TEMPPANIC 0x0004
57#endif
58