1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_LINUX_APM_H
8 #define _UAPI_LINUX_APM_H
9 #include <linux/types.h>
10 typedef unsigned short apm_event_t;
11 typedef unsigned short apm_eventinfo_t;
12 struct apm_bios_info {
13   __u16 version;
14   __u16 cseg;
15   __u32 offset;
16   __u16 cseg_16;
17   __u16 dseg;
18   __u16 flags;
19   __u16 cseg_len;
20   __u16 cseg_16_len;
21   __u16 dseg_len;
22 };
23 #define APM_STATE_READY 0x0000
24 #define APM_STATE_STANDBY 0x0001
25 #define APM_STATE_SUSPEND 0x0002
26 #define APM_STATE_OFF 0x0003
27 #define APM_STATE_BUSY 0x0004
28 #define APM_STATE_REJECT 0x0005
29 #define APM_STATE_OEM_SYS 0x0020
30 #define APM_STATE_OEM_DEV 0x0040
31 #define APM_STATE_DISABLE 0x0000
32 #define APM_STATE_ENABLE 0x0001
33 #define APM_STATE_DISENGAGE 0x0000
34 #define APM_STATE_ENGAGE 0x0001
35 #define APM_SYS_STANDBY 0x0001
36 #define APM_SYS_SUSPEND 0x0002
37 #define APM_NORMAL_RESUME 0x0003
38 #define APM_CRITICAL_RESUME 0x0004
39 #define APM_LOW_BATTERY 0x0005
40 #define APM_POWER_STATUS_CHANGE 0x0006
41 #define APM_UPDATE_TIME 0x0007
42 #define APM_CRITICAL_SUSPEND 0x0008
43 #define APM_USER_STANDBY 0x0009
44 #define APM_USER_SUSPEND 0x000a
45 #define APM_STANDBY_RESUME 0x000b
46 #define APM_CAPABILITY_CHANGE 0x000c
47 #define APM_USER_HIBERNATION 0x000d
48 #define APM_HIBERNATION_RESUME 0x000e
49 #define APM_SUCCESS 0x00
50 #define APM_DISABLED 0x01
51 #define APM_CONNECTED 0x02
52 #define APM_NOT_CONNECTED 0x03
53 #define APM_16_CONNECTED 0x05
54 #define APM_16_UNSUPPORTED 0x06
55 #define APM_32_CONNECTED 0x07
56 #define APM_32_UNSUPPORTED 0x08
57 #define APM_BAD_DEVICE 0x09
58 #define APM_BAD_PARAM 0x0a
59 #define APM_NOT_ENGAGED 0x0b
60 #define APM_BAD_FUNCTION 0x0c
61 #define APM_RESUME_DISABLED 0x0d
62 #define APM_NO_ERROR 0x53
63 #define APM_BAD_STATE 0x60
64 #define APM_NO_EVENTS 0x80
65 #define APM_NOT_PRESENT 0x86
66 #define APM_DEVICE_BIOS 0x0000
67 #define APM_DEVICE_ALL 0x0001
68 #define APM_DEVICE_DISPLAY 0x0100
69 #define APM_DEVICE_STORAGE 0x0200
70 #define APM_DEVICE_PARALLEL 0x0300
71 #define APM_DEVICE_SERIAL 0x0400
72 #define APM_DEVICE_NETWORK 0x0500
73 #define APM_DEVICE_PCMCIA 0x0600
74 #define APM_DEVICE_BATTERY 0x8000
75 #define APM_DEVICE_OEM 0xe000
76 #define APM_DEVICE_OLD_ALL 0xffff
77 #define APM_DEVICE_CLASS 0x00ff
78 #define APM_DEVICE_MASK 0xff00
79 #define APM_MAX_BATTERIES 2
80 #define APM_CAP_GLOBAL_STANDBY 0x0001
81 #define APM_CAP_GLOBAL_SUSPEND 0x0002
82 #define APM_CAP_RESUME_STANDBY_TIMER 0x0004
83 #define APM_CAP_RESUME_SUSPEND_TIMER 0x0008
84 #define APM_CAP_RESUME_STANDBY_RING 0x0010
85 #define APM_CAP_RESUME_SUSPEND_RING 0x0020
86 #define APM_CAP_RESUME_STANDBY_PCMCIA 0x0040
87 #define APM_CAP_RESUME_SUSPEND_PCMCIA 0x0080
88 #include <linux/ioctl.h>
89 #define APM_IOC_STANDBY _IO('A', 1)
90 #define APM_IOC_SUSPEND _IO('A', 2)
91 #endif
92