]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/pwr_mgt/IOPM.h
xnu-4570.51.1.tar.gz
[apple/xnu.git] / iokit / IOKit / pwr_mgt / IOPM.h
index 9623838aa6f62576e3c55a1e2a3b6475a3131c61..c8393354369ee03fd35e6f1e620c6b129c6b371f 100644 (file)
@@ -612,6 +612,39 @@ enum {
 #define kIOPMPSAdapterDetailsAmperageKey           "Amperage"
 #define kIOPMPSAdapterDetailsDescriptionKey        "Description"
 #define kIOPMPSAdapterDetailsPMUConfigurationKey    "PMUConfiguration"
+#define kIOPMPSAdapterDetailsVoltage            "AdapterVoltage"
+#define kIOPMPSAdapterDetailsSourceIDKey                   "SourceID"
+#define kIOPMPSAdapterDetailsErrorFlagsKey                 "ErrorFlags"
+#define kIOPMPSAdapterDetailsSharedSourceKey           "SharedSource"
+#define kIOPMPSAdapterDetailsCloakedKey                    "CloakedSource"
+
+// values for kIOPSPowerAdapterFamilyKey
+enum {
+    kIOPSFamilyCodeDisconnected     = 0,
+    kIOPSFamilyCodeUnsupported      = kIOReturnUnsupported,
+    kIOPSFamilyCodeFirewire     = iokit_family_err(sub_iokit_firewire, 0),
+    kIOPSFamilyCodeUSBHost      = iokit_family_err(sub_iokit_usb, 0),
+    kIOPSFamilyCodeUSBHostSuspended   = iokit_family_err(sub_iokit_usb, 1),
+    kIOPSFamilyCodeUSBDevice      = iokit_family_err(sub_iokit_usb, 2),
+    kIOPSFamilyCodeUSBAdapter     = iokit_family_err(sub_iokit_usb, 3),
+    kIOPSFamilyCodeUSBChargingPortDedicated = iokit_family_err(sub_iokit_usb, 4),
+    kIOPSFamilyCodeUSBChargingPortDownstream  = iokit_family_err(sub_iokit_usb, 5),
+    kIOPSFamilyCodeUSBChargingPort    = iokit_family_err(sub_iokit_usb, 6),
+    kIOPSFamilyCodeUSBUnknown     = iokit_family_err(sub_iokit_usb, 7),
+    kIOPSFamilyCodeAC       = iokit_family_err(sub_iokit_pmu, 0),
+    kIOPSFamilyCodeExternal     = iokit_family_err(sub_iokit_pmu, 1),
+    kIOPSFamilyCodeExternal2     = iokit_family_err(sub_iokit_pmu, 2),
+    kIOPSFamilyCodeExternal3     = iokit_family_err(sub_iokit_pmu, 3),
+    kIOPSFamilyCodeExternal4     = iokit_family_err(sub_iokit_pmu, 4),
+};
+
+// values for kIOPMPSAdapterDetailsErrorFlagsKey
+enum {
+    kIOPSAdapterErrorFlagNoErrors                     = 0,
+    kIOPSAdapterErrorFlagInsufficientAvailablePower   = (1 << 1),
+    kIOPSAdapterErrorFlagForeignObjectDetected        = (1 << 2),
+    kIOPSAdapterErrorFlagDeviceNeedsToBeRepositioned  = (1 << 3),
+};
 
 // Battery's time remaining estimate is invalid this long (seconds) after a wake
 #define kIOPMPSInvalidWakeSecondsKey           "BatteryInvalidWakeSeconds"