Delay power supply on fault checks

After the input power is restored to the power supply, there will be a
delay before the 12V is within spec. This will delay the activation of
the PGOOD indicator. When the inputFault is cleared, set the powered on
state to false, and start up the timer that will set it to true after
the adequate time has passed.

Change-Id: I9fe6224df6e01058700f9dec4fd3666839f9f595
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index 668ef18..e611315 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -267,12 +267,23 @@
             !(statusWord & status_word::VIN_UV_FAULT))
         {
             inputFault = false;
+
             statusInput = pmbusIntf.read(STATUS_INPUT, Type::Debug);
 
             log<level::INFO>("INPUT_FAULT_WARN cleared",
                              entry("POWERSUPPLY=%s", inventoryPath.c_str()),
                              entry("STATUS_WORD=0x%04X", statusWord),
                              entry("STATUS_INPUT=0x%02X", statusInput));
+
+            if (powerOn)
+            {
+                // The power supply will not be immediately powered on after
+                // the input power is restored.
+                powerOn = false;
+                // Start up the timer that will set the state to indicate we
+                // are ready for the powered on fault checks.
+                powerOnTimer.start(powerOnInterval, Timer::TimerType::oneshot);
+            }
         }
     }
 }