diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-09-04 15:06:20 +0530 |
---|---|---|
committer | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-09-26 16:21:16 +0530 |
commit | b57f151092ae04ca2849851ac406624b87666e8c (patch) | |
tree | e7a4732bc88a0a265bdff7df215af5f91f778d66 /occ_manager.hpp | |
parent | e2fb55664195a6d8379f7b07e147c3a184e23687 (diff) | |
download | openpower-occ-control-b57f151092ae04ca2849851ac406624b87666e8c.tar.gz openpower-occ-control-b57f151092ae04ca2849851ac406624b87666e8c.zip |
Set OccActive property on application start
Host sends OCC active status command just once as part
of power on operation and when that is sent, occ control
application binds the device. As part of bind, a sysfs
file gets created that would be used to communicate the
occ error status back to user.
If occ control application terminates and restarts, then
it needs some way to set OccActive property and this commit
adds that support.
Solution is to check if the device is already bound by checking
the presence of the OCC_HWMON_PATH/occ<number>-dev0 and set the
property if found
Fixes openbmc/openbmc#2238
Change-Id: I920b52e3970cc91af50b5bc68ead44c66eab8944
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'occ_manager.hpp')
-rw-r--r-- | occ_manager.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/occ_manager.hpp b/occ_manager.hpp index 7bb1042..0d32241 100644 --- a/occ_manager.hpp +++ b/occ_manager.hpp @@ -48,6 +48,7 @@ struct Manager // I2C OCC status objects are initialized directly initStatusObjects(); #else + // Check if CPU inventory exists already. auto occs = open_power::occ::finder::get(bus); if (occs.empty()) @@ -75,6 +76,7 @@ struct Manager #endif } + private: /** @brief Callback that responds to cpu creation in the inventory - * by creating the needed objects. |