Monitor UCD90160 for faults at runtime
Add the RuntimeMonitor class that will monitor the
UCD90160 faults in 2 ways:
1) Watch for the PowerLost signal, meaning system
PGOOD was lost. When it occurs, analyze the
chip for errors and then issue a proper shutdown
so a faulted device doesn't keep getting power.
2) Poll on an interval for nonfatal errors that need
to be logged but don't cause a PGOOD loss.
The main executable can now launch either the PGOODMonitor
or the RuntimeMonitor based on commandline arguments.
Change-Id: If2856f173d5d6288d8333538334b4b4cb4a60097
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/power-sequencer/argument.cpp b/power-sequencer/argument.cpp
index d668de1..e76adce 100644
--- a/power-sequencer/argument.cpp
+++ b/power-sequencer/argument.cpp
@@ -28,8 +28,12 @@
std::cerr << "Usage: " << argv[0] << " [options]\n";
std::cerr << "Options:\n";
std::cerr << " --help Print this menu\n";
- std::cerr << " --action=<action> Action: pgood-monitor\n";
- std::cerr << " --interval=<interval> Time to allow PGOOD to come up\n";
+ std::cerr << " --action=<action> Action: pgood-monitor "
+ "or runtime-monitor\n";
+ std::cerr << " --interval=<interval> Interval in seconds:\n";
+ std::cerr << " PGOOD monitor: time allowed for PGOOD to come up\n";
+ std::cerr << " Runtime monitor: polling interval.\n";
+
std::cerr << std::flush;
}