Don't log errors for voltage warnings

Some of the bits in the STATUS_VOUT command response
are just warnings, as defined by the PMBUS spec.

Previously the code would create voltage fault errors
if any bits were on in that response, and this change
is to check for the actual fault (non-warning) bits only
before creating error logs.

Also, the code will throw the response value into the journal
now if any bits are on at all because warnings are still
useful when getting a full picture of fault conditions.

Resolves openbmc/openbmc#2714

Change-Id: I51692ced4ce03bb05d64e7a90f88bd6586897942
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/pmbus.hpp b/pmbus.hpp
index 7089445..187f383 100644
--- a/pmbus.hpp
+++ b/pmbus.hpp
@@ -23,6 +23,12 @@
 // Uses Page substitution
 constexpr auto STATUS_VOUT = "statusP_vout";
 
+namespace status_vout
+{
+// Mask of bits that are only warnings
+constexpr auto WARNING_MASK = 0x6A;
+}
+
 // Current output status bits.
 constexpr auto STATUS_IOUT = "status0_iout";
 
diff --git a/power-sequencer/ucd90160.cpp b/power-sequencer/ucd90160.cpp
index ac2caa5..79f2915 100644
--- a/power-sequencer/ucd90160.cpp
+++ b/power-sequencer/ucd90160.cpp
@@ -134,9 +134,18 @@
         auto statusVout = interface.insertPageNum(STATUS_VOUT, page);
         uint8_t vout = interface.read(statusVout, Type::Debug);
 
-        //Any bit on is an error
+        //If any bits are on log them, though some are just
+        //warnings so they won't cause errors
         if (vout)
         {
+            log<level::INFO>("A voltage rail has bits on in STATUS_VOUT",
+                    entry("STATUS_VOUT=0x%X", vout),
+                    entry("PAGE=%d", page));
+        }
+
+        //Log errors if any non-warning bits on
+        if (vout & ~status_vout::WARNING_MASK)
+        {
             auto& railNames = std::get<ucd90160::railNamesField>(
                     deviceMap.find(getInstance())->second);
             auto railName = railNames.at(page);