Powercap: add p8 support

P8 uses i2c-occ and powercap is not created.
Add P8 support by creating powercap object with i2c device name.

Fixes openbmc/openbmc#2688

Change-Id: Ia63070d63f4392cc4b084ab628cdbdcf4206c883
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/occ_manager.cpp b/occ_manager.cpp
index 42b6390..67e96a6 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -108,6 +108,7 @@
     static_assert(sizeof(DEV_PATH) != 0);
 
     auto deviceNames = i2c_occ::getOccHwmonDevices(DEV_PATH);
+    auto occMasterName = deviceNames.front();
     for (auto& name : deviceNames)
     {
         i2c_occ::i2cToDbus(name);
@@ -120,6 +121,11 @@
                 path.c_str(),
                 *this));
     }
+    // The first device is master occ
+    pcap = std::make_unique<open_power::occ::powercap::PowerCap>(
+               bus,
+               *statusObjects.front(),
+               occMasterName);
 }
 #endif