Add in support for detecting an output overcurrent fault
When analyzing the STATUS_WORD bits, check if the IOUT_OC_FAULT bit is
on. That bit indicates that an output overcurrent fault condition has
occurred. Call out the power supply reporting that.
Change-Id: I18c7cd981ffc1b73ab52c90d32ba34195013e65e
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/pmbus.hpp b/pmbus.hpp
index 6682f00..97341f9 100644
--- a/pmbus.hpp
+++ b/pmbus.hpp
@@ -45,6 +45,9 @@
// The bit mask representing the UNITI_IS_OFF bit of the STATUS_WORD.
constexpr auto UNIT_IS_OFF = 0x0040;
+// The bit mask representing that an output overcurrent fault has occurred.
+constexpr auto IOUT_OC_FAULT = 0x0010;
+
// The IBM CFF power supply driver does map this bit to in1_alarm, however,
// since a number of the other bits are not mapped that way for STATUS_WORD,
// this code will just read the entire STATUS_WORD and use bit masking to find