]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/pwr_mgt/IOPowerConnection.h
xnu-2782.1.97.tar.gz
[apple/xnu.git] / iokit / IOKit / pwr_mgt / IOPowerConnection.h
index d4f53a382a6e7c980a7bfcda1662ea14e9a5d089..4e66198c24ed02ef398dc20fc63f53fa32018cd9 100644 (file)
 #include <IOKit/IOService.h>
 #include <IOKit/pwr_mgt/IOPM.h>
 
+/*! @class IOPowerConnection
+ *  Do not use IOPowerConnection. This class is an implementation detail defined
+ *  for IOPM's management of the IORegistry IOPower plane.
+ *
+ *  Only Kernel IOKit power management should reference the IOPowerConnection class.
+ */
+
 class IOPowerConnection : public IOService
 {
     OSDeclareDefaultStructors(IOPowerConnection)
@@ -46,16 +53,18 @@ class IOPowerConnection : public IOService
 protected:
     /*! @field parentKnowsState        true: parent knows state of its domain
                                        used by child */
-    bool               stateKnown;
+    bool            stateKnown;
+
     /*! @field currentPowerFlags       power flags which describe  the current state of the power domain
                                        used by child */
     IOPMPowerFlags     currentPowerFlags;
+
     /*! @field desiredDomainState      state number which corresponds to the child's desire
                                        used by parent */
     unsigned long      desiredDomainState;
 
     /*! @field requestFlag             set to true when desiredDomainState is set */
-    bool               requestFlag;
+    bool            requestFlag;
 
     /*! @field preventIdleSleepFlag    true if child has this bit set in its desired state
                                        used by parent */
@@ -67,12 +76,21 @@ protected:
 
     /*! @field awaitingAck             true if child has not yet acked our notification
                                        used by parent */
-    bool               awaitingAck;
+    bool            awaitingAck;
+
+    /*! @field readyFlag               true if the child has been added as a power child
+                                       used by parent */
+       bool            readyFlag;
 
+#ifdef XNU_KERNEL_PRIVATE
 public:
-        /*! @function setParentKnowsState
-            @abstract Sets the stateKnown variable.
-            @discussion Called by the parent when the object is created and called by the child when it discovers that the parent now knows its state. */
+    bool            delayChildNotification;
+#endif
+
+public:
+    /*! @function setParentKnowsState
+        @abstract Sets the stateKnown variable.
+        @discussion Called by the parent when the object is created and called by the child when it discovers that the parent now knows its state. */
     void setParentKnowsState (bool );
 
     /*! @function setParentCurrentPowerFlags
@@ -103,7 +121,6 @@ public:
     @discussion Called by the parent. */
     void setChildHasRequestedPower ( void );
 
-
     /*! @function childHasRequestedPower
         @abstract Return the flag that says whether the child has called requestPowerDomainState.
     @discussion Called by the PCI Aux Power Supply Driver to see if a device driver
@@ -139,6 +156,16 @@ public:
         @abstract Returns the awaitingAck variable.
         @discussion Called by the parent. */
     bool getAwaitingAck ( void );
+
+    /*! @function setReadyFlag
+        @abstract Sets the readyFlag variable.
+        @discussion Called by the parent. */
+       void setReadyFlag( bool flag );
+
+    /*! @function getReadyFlag
+        @abstract Returns the readyFlag variable.
+        @discussion Called by the parent. */
+       bool getReadyFlag( void ) const;
 };
 
 #endif /* ! _IOKIT_IOPOWERCONNECTION_H */