psu-ng: Add in detection of IOUT_OC fault

If bit 4 of STATUS_BYTE (lower byte of STATUS_WORD) turns on, there is
an output over-current fault. Add in code to detect that and log an
error, has priority after VOUT_OV fault.

Change-Id: Ia9cdb04a16a9f980aa699a8fff247d0c47e0aa93
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/phosphor-power-supply/psu_manager.cpp b/phosphor-power-supply/psu_manager.cpp
index 6d2815d..282412c 100644
--- a/phosphor-power-supply/psu_manager.cpp
+++ b/phosphor-power-supply/psu_manager.cpp
@@ -482,6 +482,18 @@
 
                     psu->setFaultLogged();
                 }
+                else if (psu->hasIoutOCFault())
+                {
+                    // Include STATUS_IOUT for Iout faults.
+                    additionalData["STATUS_IOUT"] =
+                        fmt::format("{:#02x}", psu->getStatusIout());
+
+                    createError(
+                        "xyz.openbmc_project.Power.PowerSupply.Error.IoutOCFault",
+                        additionalData);
+
+                    psu->setFaultLogged();
+                }
                 else if (psu->hasTempFault())
                 {
                     // Include STATUS_TEMPERATURE for temperature faults.