psu-ng: Add code to detect VOUT_UV_FAULT

If the output voltage hits an undervoltage condition, the VOUT
fault/warn bit in STATUS_WORD will be on, but the VOUT_OV_FAULT bit will
be off.

Check for VOUT_UV_FAULT after check for VOUT_OV_FAULT, create error,
call out the power supply indicating that fault.

Tested:
    Verify no fault detected or error logged in normal conditions on
    real hardware.
    Simulate VOUT_UV fault:
    VOUT_UV_FAULT fault: STATUS_WORD = 0x8000, STATUS_MFR_SPECIFIC = 0x0, STATUS_VOUT = 0x0
    and
    VOUT_UV_FAULT fault: STATUS_WORD = 0x8000, STATUS_MFR_SPECIFIC = 0x0, STATUS_VOUT = 0x30

Change-Id: I2605a197634616c4c2ad49f0275eaccaef7cc5f0
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/phosphor-power-supply/power_supply.hpp b/phosphor-power-supply/power_supply.hpp
index 8bd2a30..149d81f 100644
--- a/phosphor-power-supply/power_supply.hpp
+++ b/phosphor-power-supply/power_supply.hpp
@@ -198,7 +198,8 @@
     bool isFaulted() const
     {
         return (hasCommFault() || vinUVFault || inputFault || voutOVFault ||
-                ioutOCFault || tempFault || pgoodFault || mfrFault);
+                ioutOCFault || voutUVFault || tempFault || pgoodFault ||
+                mfrFault);
     }
 
     /**
@@ -258,6 +259,14 @@
     }
 
     /**
+     * @brief Returns true if VOUT_UV_FAULT occurred.
+     */
+    bool hasVoutUVFault() const
+    {
+        return voutUVFault;
+    }
+
+    /**
      * @brief Returns true if TEMPERATURE fault occurred.
      */
     bool hasTempFault() const
@@ -377,10 +386,15 @@
     /** @brief True if bit 4 of STATUS_WORD low byte is on. */
     bool ioutOCFault = false;
 
+    /** @brief True if bit 7 of STATUS_WORD high byte is on and bit 5 (VOUT_OV)
+     * of low byte is off. */
+    bool voutUVFault = false;
+
     /** @brief True if bit 2 of STATUS_WORD low byte is on. */
     bool tempFault = false;
 
-    /** @brief True if bit 11 or 6 of STATUS_WORD is on. PGOOD# is inactive, or
+    /**
+     * @brief True if bit 11 or 6 of STATUS_WORD is on. PGOOD# is inactive, or
      * the unit is off.
      */
     bool pgoodFault = false;