pfr-manager: Get i2cBusNumber and i2cSlaveAddress from EntityManager.
Add support to pull i2cBusNumber and i2cSlaveAddress from EntityManager
service dynamically.
Tested:
i2cBusNumber and i2cSlaveAddress are read and updated.
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: I90fc6f39cfffe609cfefe45fb1e17b9fd6d29f8a
diff --git a/service/src/mainapp.cpp b/service/src/mainapp.cpp
index dfbf582..5cbe32c 100644
--- a/service/src/mainapp.cpp
+++ b/service/src/mainapp.cpp
@@ -32,6 +32,8 @@
static uint8_t lastMajorErr = 0;
static uint8_t lastMinorErr = 0;
+static bool i2cConfigLoaded = false;
+
static bool stateTimerRunning = false;
bool finishedSettingChkPoint = false;
static constexpr uint8_t bmcBootFinishedChkPoint = 0x09;
@@ -489,6 +491,7 @@
pfr::stateTimer = std::make_unique<boost::asio::steady_timer>(io);
pfr::initTimer = std::make_unique<boost::asio::steady_timer>(io);
auto server = sdbusplus::asio::object_server(conn, true);
+ pfr::init(conn, pfr::i2cConfigLoaded);
pfr::monitorSignals(server, conn);
// Update CPLD Version to cpld_active object in settings.