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