+/*****************************************************************************
+ *
+ * AOT defs
+ *
+ *****************************************************************************/
+
+// signals the device should wake up to user space running
+#define kIOPMWakeEventAOTExit 0x00000002
+
+// will start a 400 ms timer before sleeping
+#define kIOPMWakeEventAOTPossibleExit 0x00000004
+
+// signals the device should wake up to user space running
+#define kIOPMWakeEventAOTConfirmedPossibleExit 0x00000008
+
+// signals the device should go back to AOT
+#define kIOPMWakeEventAOTRejectedPossibleExit 0x00000010
+
+// signals the device should go back to AOT
+#define kIOPMWakeEventAOTExpiredPossibleExit 0x00000020
+
+#define kIOPMWakeEventAOTFlags \
+ (kIOPMWakeEventAOTExit \
+ | kIOPMWakeEventAOTPossibleExit \
+ | kIOPMWakeEventAOTConfirmedPossibleExit \
+ | kIOPMWakeEventAOTRejectedPossibleExit \
+ | kIOPMWakeEventAOTExpiredPossibleExit)
+
+#define kIOPMWakeEventAOTPossibleFlags \
+ (kIOPMWakeEventAOTPossibleExit \
+ | kIOPMWakeEventAOTConfirmedPossibleExit \
+ | kIOPMWakeEventAOTRejectedPossibleExit \
+ | kIOPMWakeEventAOTExpiredPossibleExit)
+
+#define kIOPMWakeEventAOTPerCycleFlags \
+ (kIOPMWakeEventAOTPossibleExit \
+ | kIOPMWakeEventAOTRejectedPossibleExit \
+ | kIOPMWakeEventAOTExpiredPossibleExit)
+
+#define kIOPMWakeEventAOTExitFlags \
+ (kIOPMWakeEventAOTExit \
+ | kIOPMWakeEventAOTConfirmedPossibleExit)
+
+enum {
+ kIOPMAOTModeMask = 0x000000ff,
+ kIOPMAOTModeEnable = 0x00000001,
+ kIOPMAOTModeCycle = 0x00000002,
+ kIOPMAOTModeAddEventFlags = 0x00000004,
+ kIOPMAOTModeRespectTimers = 0x00000008,
+ kIOPMAOTModeDefault = (kIOPMAOTModeEnable | kIOPMAOTModeAddEventFlags | kIOPMAOTModeRespectTimers)
+};
+
+enum {
+ kIOPMAOTMetricsKernelWakeCountMax = 24
+};
+
+struct IOPMAOTMetrics
+{
+ uint32_t sleepCount;
+ uint32_t possibleCount;
+ uint32_t confirmedPossibleCount;
+ uint32_t rejectedPossibleCount;
+ uint32_t expiredPossibleCount;
+ uint32_t noTimeSetCount;
+ uint32_t rtcAlarmsCount;
+ uint32_t softwareRequestCount;
+ uint64_t totalTime;
+
+ char kernelWakeReason[kIOPMAOTMetricsKernelWakeCountMax][64];
+ // 54:10 secs:ms calendar time
+ uint64_t kernelSleepTime[kIOPMAOTMetricsKernelWakeCountMax];
+ uint64_t kernelWakeTime[kIOPMAOTMetricsKernelWakeCountMax];
+};
+
+#define kIOPMAOTPowerKey "aot-power"
+
+/*****************************************************************************
+ *
+ * Dark Wake
+ *
+ *****************************************************************************/
+
+/* An OSNumber property set on a power managed driver that the root domain
+ * will use as the driver's max power state while system is in dark wake.
+ * This property should be set prior to the driver joining the PM tree.
+ */
+#define kIOPMDarkWakeMaxPowerStateKey "IOPMDarkWakeMaxPowerState"
+