psu-ng: Include STATUS_INPUT in input fault error
Read the value of STATUS_INPUT if STATUS_WORD is not zero. Include the
value of STATUS_INPUT if logging an error for an input fault.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: I0463377a3e67faf1f32ab4a4b30ff73cbb8f5631
diff --git a/phosphor-power-supply/power_supply.hpp b/phosphor-power-supply/power_supply.hpp
index 2660f32..86ce57c 100644
--- a/phosphor-power-supply/power_supply.hpp
+++ b/phosphor-power-supply/power_supply.hpp
@@ -145,6 +145,14 @@
}
/**
+ * @brief Returns the last read value from STATUS_INPUT.
+ */
+ uint64_t getStatusInput() const
+ {
+ return statusInput;
+ }
+
+ /**
* @brief Returns the last read value from STATUS_MFR.
*/
uint64_t getMFRFault() const
@@ -263,6 +271,9 @@
/** @brief Will be updated to the latest/lastvalue read from STATUS_WORD.*/
uint64_t statusWord = 0;
+ /** @brief Will be updated to the latest/lastvalue read from STATUS_INPUT.*/
+ uint64_t statusInput = 0;
+
/** @brief Will be updated to the latest/lastvalue read from STATUS_MFR.*/
uint64_t statusMFR = 0;