psu-ng: Refactor MFR fault detection
Move handling of MFR fault to its own analyzeMFRFault() function.
This will handle checking if the MFR fault bit is on in STATUS_WORD, and
determinine what power supply specific meaning any STATUS_MFR_SPECIFIC
bits mean by calling determineMFRFault().
The analyze() function is getting a bit long and hard to read.
Change-Id: I401ebcf11943099385044081518a27511075fa94
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 2e7c63b..83ebc74 100644
--- a/phosphor-power-supply/power_supply.hpp
+++ b/phosphor-power-supply/power_supply.hpp
@@ -501,6 +501,16 @@
void determineMFRFault();
/**
+ * @brief Examine STATUS_WORD value read for MFRSPECIFIC bit on.
+ *
+ * "A manufacturer specific fault or warning has occurred."
+ *
+ * If it is on, call the determineMFRFault() helper function to examine the
+ * value read from STATUS_MFR_SPECIFIC.
+ */
+ void analyzeMFRFault();
+
+ /**
* @brief D-Bus path to use for this power supply's inventory status.
**/
std::string inventoryPath;