psu-ng: Clear faults when voltage back in range

If the last read voltage (via READ_VIN) was below the minimum and
now it is back in a valid range (100 or 200 volt range valid), clear all
the faults to allow for re-detection of faults and logging of new errors.

Trace if INPUT_FAULT_WARN or VIN_UV clear. We should not expect to see
that without sending a CLEAR_FAULTS command (or a power cycle).

Tested:
    Rainier 2S2U real hardware.
    ePDU outlet off/on allows re-detection of injected CML fault.
    - input fault, vin_uv fault, pgood/off fault.
    - repeat shows faults cleared, and new faults logged.
    Simulator pgood fault, then low voltage followed by good voltage.
    Verify simulator can re-detect faults after voltage back in range.
    Simulator fake input fault/warn on, then off and other fault on.
    - verified tracing input going off without clear faults sent.
    Simulator fake input fault/warn on, then no faults.
    - verified tracing input going off without clear faults sent.

Change-Id: Ic8022cf137978ff660680e9680f778853cbecf0d
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 f36a1cc..eb53c14 100644
--- a/phosphor-power-supply/power_supply.hpp
+++ b/phosphor-power-supply/power_supply.hpp
@@ -433,6 +433,9 @@
      * STATUS_TEMPERATURE.*/
     uint64_t statusTemperature = 0;
 
+    /** @brief Will be updated with latest converted value read from READ_VIN */
+    int inputVoltage = phosphor::pmbus::in_input::VIN_VOLTAGE_0;
+
     /** @brief True if an error for a fault has already been logged. */
     bool faultLogged = false;