pseq: Add base and UCD90320 device monitor classes
Add a power sequencer device monitoring base class and a UCD90320
subclass. Update power controller class to construct and pass device
information to device class. Update build file to support.
Signed-off-by: Jim Wright <jlwright@us.ibm.com>
Change-Id: Idf3ef53011b23f15841d93795f9f0995892b10b9
diff --git a/phosphor-power-sequencer/src/power_control.cpp b/phosphor-power-sequencer/src/power_control.cpp
index 6e9fa58..aa47598 100644
--- a/phosphor-power-sequencer/src/power_control.cpp
+++ b/phosphor-power-sequencer/src/power_control.cpp
@@ -17,6 +17,7 @@
#include "power_control.hpp"
#include "types.hpp"
+#include "ucd90320_monitor.hpp"
#include <fmt/format.h>
#include <sys/types.h>
@@ -92,12 +93,13 @@
if (i2cBus && i2cAddress && name && !name->empty())
{
- log<level::INFO>(
+ log<level::DEBUG>(
fmt::format(
"Found power sequencer device properties, name: {}, bus: {} addr: {:#02x} ",
*name, *i2cBus, *i2cAddress)
.c_str());
// Create device object
+ device = std::make_unique<UCD90320Monitor>(bus, *i2cBus, *i2cAddress);
}
}