Annotation of XNU/iokit/IOKit/pwr_mgt/IOPM.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1998-2000 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: #ifndef _IOKIT_IOPM_H
        !            23: #define _IOKIT_IOPM_H
        !            24: 
        !            25: #define IOPMMaxPowerStates 10
        !            26: 
        !            27: typedef unsigned long IOPMPowerFlags;
        !            28: 
        !            29: #define IOPMNotAttainable      0x0001
        !            30: #define IOPMPowerOn            0x0002
        !            31: #define IOPMClockNormal        0x0004
        !            32: #define IOPMClockRunning       0x0008
        !            33: #define IOPMWakeupEnabled      0x0010
        !            34:                         // following "capabilites" exist for the convenience
        !            35:                         // of the "interested drivers"
        !            36: #define IOPMDeviceUsable       0x8000
        !            37: #define IOPMMaxPerformance     0x4000
        !            38: #define IOPMContextRetained    0x2000
        !            39: #define IOPMConfigRetained     0x1000
        !            40: 
        !            41: #define IOPMNextHigherState    1
        !            42: #define IOPMHighestState       2
        !            43: #define IOPMNextLowerState     3
        !            44: #define IOPMLowestState                4
        !            45: 
        !            46: 
        !            47: enum {         // commands on power managment command queue
        !            48:     kPMbroadcastAggressiveness = 1,
        !            49:     kPMunIdleDevice,
        !            50:     kPMsleepDemand,
        !            51:     kPMwakeSignal
        !            52: };
        !            53: 
        !            54: 
        !            55: 
        !            56:                                         // Return codes
        !            57: 
        !            58: #define IOPMNoErr              0       // normal return
        !            59: 
        !            60:                         // returned by powerStateWillChange and powerStateDidChange:
        !            61: #define IOPMAckImplied         0       // acknowledgement of power state change is implied
        !            62: #define IOPMWillAckLater       1       // acknowledgement of power state change will come later
        !            63: 
        !            64:                         // returned by requestDomainState
        !            65: #define IOPMBadSpecification   4       // unrecognized specification parameter
        !            66: #define IOPMNoSuchState                5       // no power state matches search specification
        !            67: 
        !            68: #define IOPMCannotRaisePower   6       // a device cannot change its power for some reason
        !            69: 
        !            70:                         // returned by changeStateTo
        !            71: #define IOPMParameterError     7       // requested state doesn't exist
        !            72: #define IOPMNotYetInitialized  8       // device not yet fully hooked into power management "graph"
        !            73: 
        !            74: 
        !            75:                                                // used by Root Domain UserClient
        !            76: #define kNumPMMethods 4
        !            77: 
        !            78: enum {
        !            79:     kPMGeneralAggressiveness = 0,
        !            80:     kPMMinutesToDim,
        !            81:     kPMMinutesToSpinDown,
        !            82:     kPMMinutesToSleep
        !            83: };
        !            84: #define kMaxType kPMMinutesToSleep
        !            85: 
        !            86: 
        !            87: #define kIOBatteryInfoKey              "IOBatteryInfo"
        !            88: #define kIOBatteryCurrentChargeKey     "Current"
        !            89: #define kIOBatteryCapacityKey          "Capacity"
        !            90: #define kIOBatteryFlagsKey             "Flags"
        !            91: enum {
        !            92:     kIOBatteryInstalled                = (1 << 2),
        !            93:     kIOBatteryCharge           = (1 << 1),
        !            94:     kIOBatteryChargerConnect   = (1 << 0)
        !            95: };
        !            96: 
        !            97: 
        !            98: #if KERNEL && __cplusplus
        !            99: class IOService;
        !           100: 
        !           101: enum {
        !           102:     kIOPowerEmergencyLevel = 1000
        !           103: };
        !           104: 
        !           105: enum {
        !           106:     kIOPMSubclassPolicy,
        !           107:     kIOPMSuperclassPolicy1
        !           108: };
        !           109: 
        !           110: extern void IOPMRegisterDevice(const char *, IOService *);
        !           111: #endif /* KERNEL && __cplusplus */
        !           112: 
        !           113: #endif /* ! _IOKIT_IOPM_H */
        !           114: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.