psu-ng: Refactor fan fault detection
Split off code checking for fan fault/warning in STATUS_WORD to its own
function.
Change-Id: I49b6dc2d62b6ca39a564262a4745aa5ed25c14eb
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 1e1e0fe..45c4959 100644
--- a/phosphor-power-supply/power_supply.hpp
+++ b/phosphor-power-supply/power_supply.hpp
@@ -529,6 +529,15 @@
void analyzeVoutUVFault();
/**
+ * @brief Examine STATUS_WORD for the fan fault/warning bit.
+ *
+ * If fanFault is not on, trace that the bit now came on, include
+ * STATUS_WORD, STATUS_MFR_SPECIFIC, and STATUS_FANS_1_2 values as well, to
+ * help with understanding what may have caused it to be set.
+ */
+ void analyzeFanFault();
+
+ /**
* @brief Examine STATUS_WORD for temperature fault.
*/
void analyzeTemperatureFault();