From 482e31ff8e43e0fefbd697b1985795c4d35eec74 Mon Sep 17 00:00:00 2001 From: Eddie James Date: Thu, 14 Sep 2017 13:17:17 -0500 Subject: 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 --- occ_status.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'occ_status.cpp') 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 -- cgit v1.2.1