Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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_APM_H |
| 20 | #define _UAPI_LINUX_APM_H |
| 21 | #include <linux/types.h> |
| 22 | typedef unsigned short apm_event_t; |
| 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 24 | typedef unsigned short apm_eventinfo_t; |
| 25 | struct apm_bios_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 26 | __u16 version; |
| 27 | __u16 cseg; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | __u32 offset; |
| 30 | __u16 cseg_16; |
| 31 | __u16 dseg; |
| 32 | __u16 flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 34 | __u16 cseg_len; |
| 35 | __u16 cseg_16_len; |
| 36 | __u16 dseg_len; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 37 | }; |
| 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 39 | #define APM_STATE_READY 0x0000 |
| 40 | #define APM_STATE_STANDBY 0x0001 |
| 41 | #define APM_STATE_SUSPEND 0x0002 |
| 42 | #define APM_STATE_OFF 0x0003 |
| 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 44 | #define APM_STATE_BUSY 0x0004 |
| 45 | #define APM_STATE_REJECT 0x0005 |
| 46 | #define APM_STATE_OEM_SYS 0x0020 |
| 47 | #define APM_STATE_OEM_DEV 0x0040 |
| 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 49 | #define APM_STATE_DISABLE 0x0000 |
| 50 | #define APM_STATE_ENABLE 0x0001 |
| 51 | #define APM_STATE_DISENGAGE 0x0000 |
| 52 | #define APM_STATE_ENGAGE 0x0001 |
| 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 54 | #define APM_SYS_STANDBY 0x0001 |
| 55 | #define APM_SYS_SUSPEND 0x0002 |
| 56 | #define APM_NORMAL_RESUME 0x0003 |
| 57 | #define APM_CRITICAL_RESUME 0x0004 |
| 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 59 | #define APM_LOW_BATTERY 0x0005 |
| 60 | #define APM_POWER_STATUS_CHANGE 0x0006 |
| 61 | #define APM_UPDATE_TIME 0x0007 |
| 62 | #define APM_CRITICAL_SUSPEND 0x0008 |
| 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 64 | #define APM_USER_STANDBY 0x0009 |
| 65 | #define APM_USER_SUSPEND 0x000a |
| 66 | #define APM_STANDBY_RESUME 0x000b |
| 67 | #define APM_CAPABILITY_CHANGE 0x000c |
| 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 69 | #define APM_USER_HIBERNATION 0x000d |
| 70 | #define APM_HIBERNATION_RESUME 0x000e |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | #define APM_SUCCESS 0x00 |
| 72 | #define APM_DISABLED 0x01 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | #define APM_CONNECTED 0x02 |
| 75 | #define APM_NOT_CONNECTED 0x03 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 76 | #define APM_16_CONNECTED 0x05 |
| 77 | #define APM_16_UNSUPPORTED 0x06 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 79 | #define APM_32_CONNECTED 0x07 |
| 80 | #define APM_32_UNSUPPORTED 0x08 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | #define APM_BAD_DEVICE 0x09 |
| 82 | #define APM_BAD_PARAM 0x0a |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 84 | #define APM_NOT_ENGAGED 0x0b |
| 85 | #define APM_BAD_FUNCTION 0x0c |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 86 | #define APM_RESUME_DISABLED 0x0d |
| 87 | #define APM_NO_ERROR 0x53 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 89 | #define APM_BAD_STATE 0x60 |
| 90 | #define APM_NO_EVENTS 0x80 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | #define APM_NOT_PRESENT 0x86 |
| 92 | #define APM_DEVICE_BIOS 0x0000 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 94 | #define APM_DEVICE_ALL 0x0001 |
| 95 | #define APM_DEVICE_DISPLAY 0x0100 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 96 | #define APM_DEVICE_STORAGE 0x0200 |
| 97 | #define APM_DEVICE_PARALLEL 0x0300 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 99 | #define APM_DEVICE_SERIAL 0x0400 |
| 100 | #define APM_DEVICE_NETWORK 0x0500 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 101 | #define APM_DEVICE_PCMCIA 0x0600 |
| 102 | #define APM_DEVICE_BATTERY 0x8000 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 104 | #define APM_DEVICE_OEM 0xe000 |
| 105 | #define APM_DEVICE_OLD_ALL 0xffff |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 106 | #define APM_DEVICE_CLASS 0x00ff |
| 107 | #define APM_DEVICE_MASK 0xff00 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 109 | #define APM_MAX_BATTERIES 2 |
| 110 | #define APM_CAP_GLOBAL_STANDBY 0x0001 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 111 | #define APM_CAP_GLOBAL_SUSPEND 0x0002 |
| 112 | #define APM_CAP_RESUME_STANDBY_TIMER 0x0004 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 114 | #define APM_CAP_RESUME_SUSPEND_TIMER 0x0008 |
| 115 | #define APM_CAP_RESUME_STANDBY_RING 0x0010 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 116 | #define APM_CAP_RESUME_SUSPEND_RING 0x0020 |
| 117 | #define APM_CAP_RESUME_STANDBY_PCMCIA 0x0040 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | #define APM_CAP_RESUME_SUSPEND_PCMCIA 0x0080 |
| 120 | #include <linux/ioctl.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 121 | #define APM_IOC_STANDBY _IO('A', 1) |
| 122 | #define APM_IOC_SUSPEND _IO('A', 2) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 124 | #endif |