diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-07 18:14:06 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-07 18:14:06 -0400 |
| commit | d8dc91b753b881c60c766c06aeec87675a07df4a (patch) | |
| tree | 9a02f81fc5436b424d88c2340dcd6b0fe6ae6cca /include/acpi | |
| parent | 7035cdf36d5c4d913f68ff97e1c2e5603500d946 (diff) | |
| parent | 3f44ea0d1c3835872033a6633135e16f87161202 (diff) | |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pul ACPI & Power Management updates from Len Brown:
- acpidump utility added
- intel_idle driver now supports IVB Xeon
- turbostat utility can now count SMIs
- ACPI can now bind to USB3 hubs
- misc fixes
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (49 commits)
ACPI: Add new sysfs interface to export device description
ACPI: Harden acpi_table_parse_entries() against BIOS bug
tools/power/turbostat: add option to count SMIs, re-name some options
tools/power turbostat: add [-d MSR#][-D MSR#] options to print counter deltas
intel_idle: enable IVB Xeon support
tools/power turbostat: add [-m MSR#] option
tools/power turbostat: make -M output pretty
tools/power turbostat: print more turbo-limit information
tools/power turbostat: delete unused line
tools/power turbostat: run on IVB Xeon
tools/power/acpi/acpidump: create acpidump(8), local make install targets
tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs
ACPI: run _OSC after ACPI_FULL_INITIALIZATION
tools/power/acpi/acpidump: create acpidump(8), local make install targets
tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs
tools/power/acpi/acpidump: version 20071116
tools/power/acpi/acpidump: version 20070714
tools/power/acpi/acpidump: version 20060606
tools/power/acpi/acpidump: version 20051111
xo15-ebook: convert to module_acpi_driver()
...
Diffstat (limited to 'include/acpi')
| -rw-r--r-- | include/acpi/acbuffer.h | 235 | ||||
| -rw-r--r-- | include/acpi/acnames.h | 3 | ||||
| -rw-r--r-- | include/acpi/acpi_bus.h | 60 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 7 | ||||
| -rw-r--r-- | include/acpi/actbl.h | 60 | ||||
| -rw-r--r-- | include/acpi/actbl1.h | 16 | ||||
| -rw-r--r-- | include/acpi/actbl2.h | 123 | ||||
| -rw-r--r-- | include/acpi/actbl3.h | 13 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 7 |
9 files changed, 444 insertions, 80 deletions
diff --git a/include/acpi/acbuffer.h b/include/acpi/acbuffer.h new file mode 100644 index 000000000000..a1e45cdd729a --- /dev/null +++ b/include/acpi/acbuffer.h | |||
| @@ -0,0 +1,235 @@ | |||
| 1 | /****************************************************************************** | ||
| 2 | * | ||
| 3 | * Name: acbuffer.h - Support for buffers returned by ACPI predefined names | ||
| 4 | * | ||
| 5 | *****************************************************************************/ | ||
| 6 | |||
| 7 | /* | ||
| 8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
| 9 | * All rights reserved. | ||
| 10 | * | ||
| 11 | * Redistribution and use in source and binary forms, with or without | ||
| 12 | * modification, are permitted provided that the following conditions | ||
| 13 | * are met: | ||
| 14 | * 1. Redistributions of source code must retain the above copyright | ||
| 15 | * notice, this list of conditions, and the following disclaimer, | ||
| 16 | * without modification. | ||
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
| 18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
| 19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
| 20 | * including a substantially similar Disclaimer requirement for further | ||
| 21 | * binary redistribution. | ||
| 22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
| 23 | * of any contributors may be used to endorse or promote products derived | ||
| 24 | * from this software without specific prior written permission. | ||
| 25 | * | ||
| 26 | * Alternatively, this software may be distributed under the terms of the | ||
| 27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
| 28 | * Software Foundation. | ||
| 29 | * | ||
| 30 | * NO WARRANTY | ||
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
| 40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 41 | * POSSIBILITY OF SUCH DAMAGES. | ||
| 42 | */ | ||
| 43 | |||
| 44 | #ifndef __ACBUFFER_H__ | ||
| 45 | #define __ACBUFFER_H__ | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Contains buffer structures for these predefined names: | ||
| 49 | * _FDE, _GRT, _GTM, _PLD, _SRT | ||
| 50 | */ | ||
| 51 | |||
| 52 | /* | ||
| 53 | * Note: C bitfields are not used for this reason: | ||
| 54 | * | ||
| 55 | * "Bitfields are great and easy to read, but unfortunately the C language | ||
| 56 | * does not specify the layout of bitfields in memory, which means they are | ||
| 57 | * essentially useless for dealing with packed data in on-disk formats or | ||
| 58 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, | ||
| 59 | * this decision was a design error in C. Ritchie could have picked an order | ||
| 60 | * and stuck with it." Norman Ramsey. | ||
| 61 | * See http://stackoverflow.com/a/1053662/41661 | ||
| 62 | */ | ||
| 63 | |||
| 64 | /* _FDE return value */ | ||
| 65 | |||
| 66 | struct acpi_fde_info { | ||
| 67 | u32 floppy0; | ||
| 68 | u32 floppy1; | ||
| 69 | u32 floppy2; | ||
| 70 | u32 floppy3; | ||
| 71 | u32 tape; | ||
| 72 | }; | ||
| 73 | |||
| 74 | /* | ||
| 75 | * _GRT return value | ||
| 76 | * _SRT input value | ||
| 77 | */ | ||
| 78 | struct acpi_grt_info { | ||
| 79 | u16 year; | ||
| 80 | u8 month; | ||
| 81 | u8 day; | ||
| 82 | u8 hour; | ||
| 83 | u8 minute; | ||
| 84 | u8 second; | ||
| 85 | u8 valid; | ||
| 86 | u16 milliseconds; | ||
| 87 | u16 timezone; | ||
| 88 | u8 daylight; | ||
| 89 | u8 reserved[3]; | ||
| 90 | }; | ||
| 91 | |||
| 92 | /* _GTM return value */ | ||
| 93 | |||
| 94 | struct acpi_gtm_info { | ||
| 95 | u32 pio_speed0; | ||
| 96 | u32 dma_speed0; | ||
| 97 | u32 pio_speed1; | ||
| 98 | u32 dma_speed1; | ||
| 99 | u32 flags; | ||
| 100 | }; | ||
| 101 | |||
| 102 | /* | ||
| 103 | * Formatted _PLD return value. The minimum size is a package containing | ||
| 104 | * one buffer. | ||
| 105 | * Revision 1: Buffer is 16 bytes (128 bits) | ||
| 106 | * Revision 2: Buffer is 20 bytes (160 bits) | ||
| 107 | * | ||
| 108 | * Note: This structure is returned from the acpi_decode_pld_buffer | ||
| 109 | * interface. | ||
| 110 | */ | ||
| 111 | struct acpi_pld_info { | ||
| 112 | u8 revision; | ||
| 113 | u8 ignore_color; | ||
| 114 | u32 color; | ||
| 115 | u16 width; | ||
| 116 | u16 height; | ||
| 117 | u8 user_visible; | ||
| 118 | u8 dock; | ||
| 119 | u8 lid; | ||
| 120 | u8 panel; | ||
| 121 | u8 vertical_position; | ||
| 122 | u8 horizontal_position; | ||
| 123 | u8 shape; | ||
| 124 | u8 group_orientation; | ||
| 125 | u8 group_token; | ||
| 126 | u8 group_position; | ||
| 127 | u8 bay; | ||
| 128 | u8 ejectable; | ||
| 129 | u8 ospm_eject_required; | ||
| 130 | u8 cabinet_number; | ||
| 131 | u8 card_cage_number; | ||
| 132 | u8 reference; | ||
| 133 | u8 rotation; | ||
| 134 | u8 order; | ||
| 135 | u8 reserved; | ||
| 136 | u16 vertical_offset; | ||
| 137 | u16 horizontal_offset; | ||
| 138 | }; | ||
| 139 | |||
| 140 | /* | ||
| 141 | * Macros to: | ||
| 142 | * 1) Convert a _PLD buffer to internal struct acpi_pld_info format - ACPI_PLD_GET* | ||
| 143 | * (Used by acpi_decode_pld_buffer) | ||
| 144 | * 2) Construct a _PLD buffer - ACPI_PLD_SET* | ||
| 145 | * (Intended for BIOS use only) | ||
| 146 | */ | ||
| 147 | #define ACPI_PLD_REV1_BUFFER_SIZE 16 /* For Revision 1 of the buffer (From ACPI spec) */ | ||
| 148 | #define ACPI_PLD_BUFFER_SIZE 20 /* For Revision 2 of the buffer (From ACPI spec) */ | ||
| 149 | |||
| 150 | /* First 32-bit dword, bits 0:32 */ | ||
| 151 | |||
| 152 | #define ACPI_PLD_GET_REVISION(dword) ACPI_GET_BITS (dword, 0, ACPI_7BIT_MASK) | ||
| 153 | #define ACPI_PLD_SET_REVISION(dword,value) ACPI_SET_BITS (dword, 0, ACPI_7BIT_MASK, value) /* Offset 0, Len 7 */ | ||
| 154 | |||
| 155 | #define ACPI_PLD_GET_IGNORE_COLOR(dword) ACPI_GET_BITS (dword, 7, ACPI_1BIT_MASK) | ||
| 156 | #define ACPI_PLD_SET_IGNORE_COLOR(dword,value) ACPI_SET_BITS (dword, 7, ACPI_1BIT_MASK, value) /* Offset 7, Len 1 */ | ||
| 157 | |||
| 158 | #define ACPI_PLD_GET_COLOR(dword) ACPI_GET_BITS (dword, 8, ACPI_24BIT_MASK) | ||
| 159 | #define ACPI_PLD_SET_COLOR(dword,value) ACPI_SET_BITS (dword, 8, ACPI_24BIT_MASK, value) /* Offset 8, Len 24 */ | ||
| 160 | |||
| 161 | /* Second 32-bit dword, bits 33:63 */ | ||
| 162 | |||
| 163 | #define ACPI_PLD_GET_WIDTH(dword) ACPI_GET_BITS (dword, 0, ACPI_16BIT_MASK) | ||
| 164 | #define ACPI_PLD_SET_WIDTH(dword,value) ACPI_SET_BITS (dword, 0, ACPI_16BIT_MASK, value) /* Offset 32+0=32, Len 16 */ | ||
| 165 | |||
| 166 | #define ACPI_PLD_GET_HEIGHT(dword) ACPI_GET_BITS (dword, 16, ACPI_16BIT_MASK) | ||
| 167 | #define ACPI_PLD_SET_HEIGHT(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 32+16=48, Len 16 */ | ||
| 168 | |||
| 169 | /* Third 32-bit dword, bits 64:95 */ | ||
| 170 | |||
| 171 | #define ACPI_PLD_GET_USER_VISIBLE(dword) ACPI_GET_BITS (dword, 0, ACPI_1BIT_MASK) | ||
| 172 | #define ACPI_PLD_SET_USER_VISIBLE(dword,value) ACPI_SET_BITS (dword, 0, ACPI_1BIT_MASK, value) /* Offset 64+0=64, Len 1 */ | ||
| 173 | |||
| 174 | #define ACPI_PLD_GET_DOCK(dword) ACPI_GET_BITS (dword, 1, ACPI_1BIT_MASK) | ||
| 175 | #define ACPI_PLD_SET_DOCK(dword,value) ACPI_SET_BITS (dword, 1, ACPI_1BIT_MASK, value) /* Offset 64+1=65, Len 1 */ | ||
| 176 | |||
| 177 | #define ACPI_PLD_GET_LID(dword) ACPI_GET_BITS (dword, 2, ACPI_1BIT_MASK) | ||
