]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
2d21ac55 | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
1c79356b | 5 | * |
2d21ac55 A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. The rights granted to you under the License | |
10 | * may not be used to create, or enable the creation or redistribution of, | |
11 | * unlawful or unlicensed copies of an Apple operating system, or to | |
12 | * circumvent, violate, or enable the circumvention or violation of, any | |
13 | * terms of an Apple operating system software license agreement. | |
8f6c56a5 | 14 | * |
2d21ac55 A |
15 | * Please obtain a copy of the License at |
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | |
17 | * | |
18 | * The Original Code and all software distributed under the License are | |
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
8f6c56a5 A |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
2d21ac55 A |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
23 | * Please see the License for the specific language governing rights and | |
24 | * limitations under the License. | |
8f6c56a5 | 25 | * |
2d21ac55 | 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
1c79356b | 27 | */ |
3e170ce0 A |
28 | |
29 | #ifndef _IOKIT_IOPMPOWERSTATE_H | |
30 | #define _IOKIT_IOPMPOWERSTATE_H | |
31 | ||
1c79356b A |
32 | #include <IOKit/pwr_mgt/IOPM.h> |
33 | ||
2d21ac55 A |
34 | /*! @header IOPMpowerState.h |
35 | @abstract Defines the struct IOPMPowerState that power managed drivers should use to describe their power states. | |
36 | */ | |
37 | ||
38 | /*! @struct IOPMPowerState | |
39 | @abstract Describes a device's power state. | |
40 | @discussion To take part in system power management, drivers should define an array of 2 or more power states and pass it to kernel power management through IOService::registerPowerDriver. | |
41 | @field version Defines version number of this struct. Just use the value "1" when defining an IOPMPowerState. | |
42 | @field capabilityFlags Describes the capability of the device in this state. | |
43 | @field outputPowerCharacter Describes the power provided in this state. | |
44 | @field inputPowerRequirement Describes the input power required in this state. | |
45 | @field staticPower Describes average consumption in milliwatts. Unused; drivers may specify 0. | |
39236c6e | 46 | @field stateOrder Valid in version kIOPMPowerStateVersion2 or greater of this structure. Defines ordering of power states independently of the power state ordinal. |
2d21ac55 A |
47 | @field powerToAttain Describes dditional power to attain this state from next lower state (in milliWatts). Unused; drivers may specify 0. |
48 | @field timeToAttain Describes time required to enter this state from next lower state (in microseconds). Unused; drivers may specify 0. | |
49 | @field settleUpTime Describes settle time required after entering this state from next lower state (microseconds). Unused; drivers may specify 0. | |
50 | @field timeToLower Describes time required to enter next lower state from this one (microseconds). Unused; drivers may specify 0. | |
51 | @field settleDownTime Settle time required after entering next lower state from this state (microseconds). Unused; drivers may specify 0. | |
52 | @field powerDomainBudget Describes power in milliWatts a domain in this state can deliver to its children. Unused; drivers may specify 0. | |
53 | } | |
54 | */ | |
55 | ||
1c79356b A |
56 | struct IOPMPowerState |
57 | { | |
2d21ac55 A |
58 | unsigned long version; |
59 | IOPMPowerFlags capabilityFlags; | |
60 | IOPMPowerFlags outputPowerCharacter; | |
61 | IOPMPowerFlags inputPowerRequirement; | |
62 | unsigned long staticPower; | |
39236c6e | 63 | unsigned long stateOrder; |
2d21ac55 A |
64 | unsigned long powerToAttain; |
65 | unsigned long timeToAttain; | |
66 | unsigned long settleUpTime; | |
67 | unsigned long timeToLower; | |
68 | unsigned long settleDownTime; | |
69 | unsigned long powerDomainBudget; | |
1c79356b A |
70 | }; |
71 | ||
72 | typedef struct IOPMPowerState IOPMPowerState; | |
73 | ||
0b4e3aa0 | 74 | enum { |
39236c6e A |
75 | kIOPMPowerStateVersion1 = 1, |
76 | kIOPMPowerStateVersion2 = 2 | |
0b4e3aa0 | 77 | }; |
3e170ce0 A |
78 | |
79 | #endif /* _IOKIT_IOPMPOWERSTATE_H */ |