Add GPU error logging functions

Add functions to log the GPU PGOOD and overtemp
errors.

Change-Id: I6f58d76883f8a78a3301481dbacd111c74b396d4
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/power-sequencer/ucd90160.cpp b/power-sequencer/ucd90160.cpp
index c819d66..8317837 100644
--- a/power-sequencer/ucd90160.cpp
+++ b/power-sequencer/ucd90160.cpp
@@ -283,5 +283,31 @@
     return gpioDevicePath;
 }
 
+void UCD90160::gpuPGOODError(const std::string& callout)
+{
+    util::NamesValues nv;
+    nv.add("STATUS_WORD", readStatusWord());
+    nv.add("MFR_STATUS", readMFRStatus());
+
+    using metadata = xyz::openbmc_project::Power::Fault::GPUPowerFault;
+
+    report<GPUPowerFault>(
+            metadata::RAW_STATUS(nv.get().c_str()),
+            metadata::GPU(callout.c_str()));
+}
+
+void UCD90160::gpuOverTempError(const std::string& callout)
+{
+    util::NamesValues nv;
+    nv.add("STATUS_WORD", readStatusWord());
+    nv.add("MFR_STATUS", readMFRStatus());
+
+    using metadata = xyz::openbmc_project::Power::Fault::GPUOverTemp;
+
+    report<GPUOverTemp>(
+            metadata::RAW_STATUS(nv.get().c_str()),
+            metadata::GPU(callout.c_str()));
+}
+
 }
 }