summaryrefslogtreecommitdiffstats
path: root/occ_status.cpp
diff options
context:
space:
mode:
authorEddie James <eajames@us.ibm.com>2017-09-14 13:17:17 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-12 04:48:00 +0000
commit482e31ff8e43e0fefbd697b1985795c4d35eec74 (patch)
tree9db1fcac3446e4d6221b8609e92f68a57d4bb0a0 /occ_status.cpp
parent30417a15fa35e26d5127f12e0a85c3fe74eff0d0 (diff)
downloadopenpower-occ-control-482e31ff8e43e0fefbd697b1985795c4d35eec74.tar.gz
openpower-occ-control-482e31ff8e43e0fefbd697b1985795c4d35eec74.zip
Add watches for throttling reported by the OCC
Add Error objects to watch the sysfs entries provided by the OCC hwmon driver that report various types of throttling. Also needed to add a boolean input to the Error callback interface. Resolves openbmc/openbmc#1821 Change-Id: I4425770a92ace0f73024b3dc4c577ce46957a62a Signed-off-by: Eddie James <eajames@us.ibm.com>
Diffstat (limited to 'occ_status.cpp')
-rw-r--r--occ_status.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/occ_status.cpp b/occ_status.cpp
index 36520b5..8867276 100644
--- a/occ_status.cpp
+++ b/occ_status.cpp
@@ -63,13 +63,17 @@ bool Status::occActive(bool value)
}
// Callback handler when a device error is reported.
-void Status::deviceErrorHandler()
+void Status::deviceErrorHandler(bool error)
{
- // This would deem OCC inactive
- this->occActive(false);
+ // Make sure we have an error
+ if (error)
+ {
+ // This would deem OCC inactive
+ this->occActive(false);
- // Reset the OCC
- this->resetOCC();
+ // Reset the OCC
+ this->resetOCC();
+ }
}
// Sends message to host control command handler to reset OCC
OpenPOWER on IntegriCloud