]> git.saurik.com Git - apple/xnu.git/blame - iokit/IOKit/pwr_mgt/IOPMDeprecated.h
xnu-792.10.96.tar.gz
[apple/xnu.git] / iokit / IOKit / pwr_mgt / IOPMDeprecated.h
CommitLineData
c0fea474
A
1/*
2 * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23#ifndef _IOPMDeprecated_h_
24#define _IOPMDeprecated_h_
25
26#ifdef __ppc__
27
28// Power events
29enum {
30 kClamshellClosedEventMask = (1<<0), // User closed lid
31 kDockingBarEventMask = (1<<1), // OBSOLETE
32 kACPlugEventMask = (1<<2), // User plugged or unplugged adapter
33 kFrontPanelButtonEventMask = (1<<3), // User hit the front panel button
34 kBatteryStatusEventMask = (1<<4) // Battery status has changed
35};
36
37// PUBLIC power management features
38// NOTE: this is a direct port from classic, some of these bits
39// are obsolete but are included for completeness
40enum {
41 kPMHasWakeupTimerMask = (1<<0), // 1=wake timer is supported
42 kPMHasSharedModemPortMask = (1<<1), // Not used
43 kPMHasProcessorCyclingMask = (1<<2), // 1=processor cycling supported
44 kPMMustProcessorCycleMask = (1<<3), // Not used
45 kPMHasReducedSpeedMask = (1<<4), // 1=supports reduced processor speed
46 kPMDynamicSpeedChangeMask = (1<<5), // 1=supports changing processor speed on the fly
47 kPMHasSCSIDiskModeMask = (1<<6), // 1=supports using machine as SCSI drive
48 kPMCanGetBatteryTimeMask = (1<<7), // 1=battery time can be calculated
49 kPMCanWakeupOnRingMask = (1<<8), // 1=machine can wake on modem ring
50 kPMHasDimmingSupportMask = (1<<9), // 1=has monitor dimming support
51 kPMHasStartupTimerMask = (1<<10), // 1=can program startup timer
52 kPMHasChargeNotificationMask = (1<<11), // 1=client can determine charger status/get notifications
53 kPMHasDimSuspendSupportMask = (1<<12), // 1=can dim diplay to DPMS ('off') state
54 kPMHasWakeOnNetActivityMask = (1<<13), // 1=supports waking upon receipt of net packet
55 kPMHasWakeOnLidMask = (1<<14), // 1=can wake upon lid/case opening
56 kPMCanPowerOffPCIBusMask = (1<<15), // 1=can remove power from PCI bus on sleep
57 kPMHasDeepSleepMask = (1<<16), // 1=supports deep (hibernation) sleep
58 kPMHasSleepMask = (1<<17), // 1=machine support low power sleep (ala powerbooks)
59 kPMSupportsServerModeAPIMask = (1<<18), // 1=supports reboot on AC resume for unexpected power loss
60 kPMHasUPSIntegrationMask = (1<<19) // 1=supports incorporating UPS devices into power source calcs
61};
62
63// PRIVATE power management features
64// NOTE: this is a direct port from classic, some of these bits
65// are obsolete but are included for completeness.
66enum {
67 kPMHasExtdBattInfoMask = (1<<0), // Not used
68 kPMHasBatteryIDMask = (1<<1), // Not used
69 kPMCanSwitchPowerMask = (1<<2), // Not used
70 kPMHasCelsiusCyclingMask = (1<<3), // Not used
71 kPMHasBatteryPredictionMask = (1<<4), // Not used
72 kPMHasPowerLevelsMask = (1<<5), // Not used
73 kPMHasSleepCPUSpeedMask = (1<<6), // Not used
74 kPMHasBtnIntHandlersMask = (1<<7), // 1=supports individual button interrupt handlers
75 kPMHasSCSITermPowerMask = (1<<8), // 1=supports SCSI termination power switch
76 kPMHasADBButtonHandlersMask = (1<<9), // 1=supports button handlers via ADB
77 kPMHasICTControlMask = (1<<10), // 1=supports ICT control
78 kPMHasLegacyDesktopSleepMask = (1<<11), // 1=supports 'doze' style sleep
79 kPMHasDeepIdleMask = (1<<12), // 1=supports Idle2 in hardware
80 kPMOpenLidPreventsSleepMask = (1<<13), // 1=open case prevent machine from sleeping
81 kPMClosedLidCausesSleepMask = (1<<14), // 1=case closed (clamshell closed) causes sleep
82 kPMHasFanControlMask = (1<<15), // 1=machine has software-programmable fan/thermostat controls
83 kPMHasThermalControlMask = (1<<16), // 1=machine supports thermal monitoring
84 kPMHasVStepSpeedChangeMask = (1<<17), // 1=machine supports processor voltage/clock change
85 kPMEnvironEventsPolledMask = (1<<18) // 1=machine doesn't generate pmu env ints, we must poll instead
86};
87
88// DEFAULT public and private features for machines whose device tree
89// does NOT contain this information (pre-Core99).
90
91// For Cuda-based Desktops
92
93#define kStdDesktopPMFeatures kPMHasWakeupTimerMask |\
94 kPMHasProcessorCyclingMask |\
95 kPMHasDimmingSupportMask |\
96 kPMHasStartupTimerMask |\
97 kPMSupportsServerModeAPIMask |\
98 kPMHasUPSIntegrationMask
99
100#define kStdDesktopPrivPMFeatures kPMHasExtdBattInfoMask |\
101 kPMHasICTControlMask |\
102 kPMHasLegacyDesktopSleepMask
103
104#define kStdDesktopNumBatteries 0
105
106// For Wallstreet (PowerBook G3 Series 1998)
107
108#define kWallstreetPMFeatures kPMHasWakeupTimerMask |\
109 kPMHasProcessorCyclingMask |\
110 kPMHasReducedSpeedMask |\
111 kPMDynamicSpeedChangeMask |\
112 kPMHasSCSIDiskModeMask |\
113 kPMCanGetBatteryTimeMask |\
114 kPMHasDimmingSupportMask |\
115 kPMHasChargeNotificationMask |\
116 kPMHasDimSuspendSupportMask |\
117 kPMHasSleepMask
118
119#define kWallstreetPrivPMFeatures kPMHasExtdBattInfoMask |\
120 kPMHasBatteryIDMask |\
121 kPMCanSwitchPowerMask |\
122 kPMHasADBButtonHandlersMask |\
123 kPMHasSCSITermPowerMask |\
124 kPMHasICTControlMask |\
125 kPMClosedLidCausesSleepMask |\
126 kPMEnvironEventsPolledMask
127
128#define kStdPowerBookPMFeatures kWallstreetPMFeatures
129#define kStdPowerBookPrivPMFeatures kWallstreetPrivPMFeatures
130
131#define kStdPowerBookNumBatteries 2
132
133// For 101 (PowerBook G3 Series 1999)
134
135#define k101PMFeatures kPMHasWakeupTimerMask |\
136 kPMHasProcessorCyclingMask |\
137 kPMHasReducedSpeedMask |\
138 kPMDynamicSpeedChangeMask |\
139 kPMHasSCSIDiskModeMask |\
140 kPMCanGetBatteryTimeMask |\
141 kPMHasDimmingSupportMask |\
142 kPMHasChargeNotificationMask |\
143 kPMHasDimSuspendSupportMask |\
144 kPMHasSleepMask |\
145 kPMHasUPSIntegrationMask
146
147#define k101PrivPMFeatures kPMHasExtdBattInfoMask |\
148 kPMHasBatteryIDMask |\
149 kPMCanSwitchPowerMask |\
150 kPMHasADBButtonHandlersMask |\
151 kPMHasSCSITermPowerMask |\
152 kPMHasICTControlMask |\
153 kPMClosedLidCausesSleepMask |\
154 kPMEnvironEventsPolledMask
155
156
157// These flags are deprecated. Use the version with the kIOPM prefix in IOPM.h
158enum {
159 kACInstalled = (1<<0),
160 kBatteryCharging = (1<<1),
161 kBatteryInstalled = (1<<2),
162 kUPSInstalled = (1<<3),
163 kBatteryAtWarn = (1<<4),
164 kBatteryDepleted = (1<<5),
165 kACnoChargeCapability = (1<<6), // AC adapter cannot charge battery
166 kRawLowBattery = (1<<7), // used only by Platform Expert
167 kForceLowSpeed = (1<<8) // set by Platfm Expert, chk'd by Pwr Plugin};
168};
169
170#endif /* __ppc32 */
171#endif /* _IOPMDeprecated_h_ */