Power on state machine fix
There is a issue if SIO power good comes before PS Power OK then we
miss this event. So handling this event while power off state.
Tested: Verified with power on and off with journal output.
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Change-Id: I836ee00fe74e4a8a98f5b6953fa979e9861abb2d
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index 2cdda2c..abdc564 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -1254,6 +1254,10 @@
case Event::psPowerOKWatchdogTimerExpired:
setPowerState(PowerState::failedTransitionToOn);
break;
+ case Event::sioPowerGoodAssert:
+ psPowerOKWatchdogTimer.cancel();
+ setPowerState(PowerState::on);
+ break;
default:
std::cerr << "No action taken.\n";
break;