regulators: Add clearErrorHistory to Device class

Add a clearErrorHistory() method to the Device class.  The method should
clear all data on previously logged errors.  If the error occurs again
in the future, it will be logged again.

This method is normally called when the system is being powered on.  For
code that runs repeatedly, errors are only logged once per boot.

When the system is powered off, hardware may be replaced that fixes the
problem.  Thus, errors are cleared during power on.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I6683b0c7b9abd61748ccb3512dda9111daed4929
diff --git a/phosphor-regulators/src/device.hpp b/phosphor-regulators/src/device.hpp
index 8ef37fb..4937567 100644
--- a/phosphor-regulators/src/device.hpp
+++ b/phosphor-regulators/src/device.hpp
@@ -92,6 +92,16 @@
     void clearCache();
 
     /**
+     * Clears all error history.
+     *
+     * All data on previously logged errors will be deleted.  If errors occur
+     * again in the future they will be logged again.
+     *
+     * This method is normally called when the system is being powered on.
+     */
+    void clearErrorHistory();
+
+    /**
      * Closes this device.
      *
      * Closes any interfaces that are open to this device.  Releases any other