regulators: Clear cached hardware data during boot

Clear cached data about hardware devices when the system is powering on
(booting).

While the system was powered off, hardware devices containing voltage
regulators could have been added, removed, or replaced.  Cached hardware
data might now be invalid.

Tested:
* Ran automated test cases
* Verified that cached data is cleared without errors during boot
  * When config file was found and loaded
  * When no config file was found

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ief45fe32ddcb122847d201e89ca1267526a87e3c
diff --git a/phosphor-regulators/src/chassis.cpp b/phosphor-regulators/src/chassis.cpp
index 85e8275..f84540d 100644
--- a/phosphor-regulators/src/chassis.cpp
+++ b/phosphor-regulators/src/chassis.cpp
@@ -30,6 +30,15 @@
     }
 }
 
+void Chassis::clearCache()
+{
+    // Clear any cached data in each device
+    for (std::unique_ptr<Device>& device : devices)
+    {
+        device->clearCache();
+    }
+}
+
 void Chassis::closeDevices(Services& services)
 {
     // Log debug message in journal