1 | /* |
2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. |
3 | * |
4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
5 | * |
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. |
14 | * |
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 |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, |
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. |
25 | * |
26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
27 | */ |
28 | |
29 | #ifndef _IOKIT_IOPMPOWERSTATE_H |
30 | #define _IOKIT_IOPMPOWERSTATE_H |
31 | |
32 | #include <IOKit/pwr_mgt/IOPM.h> |
33 | |
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. |
46 | * @field stateOrder Valid in version kIOPMPowerStateVersion2 or greater of this structure. Defines ordering of power states independently of the power state ordinal. |
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 | |
56 | struct IOPMPowerState { |
57 | unsigned long version; |
58 | IOPMPowerFlags capabilityFlags; |
59 | IOPMPowerFlags outputPowerCharacter; |
60 | IOPMPowerFlags inputPowerRequirement; |
61 | unsigned long staticPower; |
62 | unsigned long stateOrder; |
63 | unsigned long powerToAttain; |
64 | unsigned long timeToAttain; |
65 | unsigned long settleUpTime; |
66 | unsigned long timeToLower; |
67 | unsigned long settleDownTime; |
68 | unsigned long powerDomainBudget; |
69 | }; |
70 | |
71 | typedef struct IOPMPowerState IOPMPowerState; |
72 | |
73 | enum { |
74 | kIOPMPowerStateVersion1 = 1, |
75 | kIOPMPowerStateVersion2 = 2 |
76 | }; |
77 | |
78 | #endif /* _IOKIT_IOPMPOWERSTATE_H */ |
79 | |