pseq: Add UCD90320 specific error handling

Add device specific handling for voltage and power good failures to
UCD90320 device subclass.

Signed-off-by: Jim Wright <jlwright@us.ibm.com>
Change-Id: I0ed7657320f4944d64ee434c1d02ce25d5cdc43b
diff --git a/phosphor-power-sequencer/src/ucd90320_monitor.hpp b/phosphor-power-sequencer/src/ucd90320_monitor.hpp
index 97958ce..b4d1916 100644
--- a/phosphor-power-sequencer/src/ucd90320_monitor.hpp
+++ b/phosphor-power-sequencer/src/ucd90320_monitor.hpp
@@ -49,6 +49,9 @@
      */
     void interfacesAddedHandler(sdbusplus::message::message& msg);
 
+    /** @copydoc PowerSequencerMonitor::onFailure() */
+    void onFailure(bool timeout, const std::string& powerSupplyError) override;
+
   private:
     /**
      * Set of GPIO lines to monitor in this UCD chip.
@@ -76,6 +79,20 @@
     std::vector<std::string> rails;
 
     /**
+     * Checks for PGOOD faults on the device.
+     * @param[in] additionalData AdditionalData property of the error log entry
+     * @return bool true if an error log was created
+     */
+    bool checkPGOODFaults(std::map<std::string, std::string>& additionalData);
+
+    /**
+     * Checks for VOUT faults on the device.
+     * @param[in] additionalData AdditionalData property of the error log entry
+     * @return bool true if an error log was created
+     */
+    bool checkVOUTFaults(std::map<std::string, std::string>& additionalData);
+
+    /**
      * Finds the list of compatible system types using D-Bus methods.
      * This list is used to find the correct JSON configuration file for the
      * current system.
@@ -99,6 +116,18 @@
     void parseConfigFile(const std::filesystem::path& pathName);
 
     /**
+     * Reads the mfr_status register
+     * @return uint32_t the register contents
+     */
+    uint32_t readMFRStatus();
+
+    /**
+     * Reads the status_word register
+     * @return uint16_t the register contents
+     */
+    uint16_t readStatusWord();
+
+    /**
      * Set up GPIOs
      * @param[in] offsets the list of pin offsets
      */