pseq: Prevent multiple failures
Multiple failures can occur when the power down sequence is slow. Add a
flag to threshold the failures. Clear the flag at power on.
Signed-off-by: Jim Wright <jlwright@us.ibm.com>
Change-Id: I1b476feff1967b4fa60f29bd719bf6ee14fba103
diff --git a/phosphor-power-sequencer/src/power_control.hpp b/phosphor-power-sequencer/src/power_control.hpp
index 5bd5e47..560a5f9 100644
--- a/phosphor-power-sequencer/src/power_control.hpp
+++ b/phosphor-power-sequencer/src/power_control.hpp
@@ -83,7 +83,12 @@
bool deviceFound{false};
/**
- * Indicates if a state transistion is taking place
+ * Indicates if a failure has already been found. Cleared at power on.
+ */
+ bool failureFound{false};
+
+ /**
+ * Indicates if a state transition is taking place
*/
bool inStateTransition{false};
@@ -125,7 +130,7 @@
gpiod::line powerControlLine;
/**
- * Power supply error
+ * Power supply error. Cleared at power on.
*/
std::string powerSupplyError;