Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/include/IOKit/pwr_mgt/IOPMpowerState.h

Source at commit 1129 created 12 years 11 months ago.
By meklort, Change options.o so that it reloads the system config as well. Also change it so that it uses that config for variables (NOTE: if the calue exists in chameleonConfig, it's used instead.
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#include <IOKit/pwr_mgt/IOPM.h>
29
30/*! @header IOPMpowerState.h
31 @abstract Defines the struct IOPMPowerState that power managed drivers should use to describe their power states.
32*/
33
34/*! @struct IOPMPowerState
35 @abstract Describes a device's power state.
36 @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.
37 @field version Defines version number of this struct. Just use the value "1" when defining an IOPMPowerState.
38 @fieldcapabilityFlags Describes the capability of the device in this state.
39 @fieldoutputPowerCharacter Describes the power provided in this state.
40 @fieldinputPowerRequirement Describes the input power required in this state.
41 @fieldstaticPower Describes average consumption in milliwatts. Unused; drivers may specify 0.
42 @fieldunbudgetedPower Describes additional consumption from separate power supply (milliWatts). Unused; drivers may specify 0.
43 @fieldpowerToAttain Describes dditional power to attain this state from next lower state (in milliWatts). Unused; drivers may specify 0.
44 @fieldtimeToAttain Describes time required to enter this state from next lower state (in microseconds). Unused; drivers may specify 0.
45 @fieldsettleUpTime Describes settle time required after entering this state from next lower state (microseconds). Unused; drivers may specify 0.
46 @field timeToLower Describes time required to enter next lower state from this one (microseconds). Unused; drivers may specify 0.
47 @fieldsettleDownTime Settle time required after entering next lower state from this state (microseconds). Unused; drivers may specify 0.
48 @fieldpowerDomainBudget Describes power in milliWatts a domain in this state can deliver to its children. Unused; drivers may specify 0.
49}
50*/
51
52struct IOPMPowerState
53{
54 unsigned longversion;
55 IOPMPowerFlagscapabilityFlags;
56 IOPMPowerFlagsoutputPowerCharacter;
57 IOPMPowerFlagsinputPowerRequirement;
58 unsigned longstaticPower;
59 unsigned longunbudgetedPower;
60 unsigned longpowerToAttain;
61 unsigned longtimeToAttain;
62 unsigned longsettleUpTime;
63 unsigned longtimeToLower;
64 unsigned longsettleDownTime;
65 unsigned longpowerDomainBudget;
66};
67
68typedef struct IOPMPowerState IOPMPowerState;
69
70enum {
71 kIOPMPowerStateVersion1 = 1
72};
73

Archive Download this file

Revision: 1129