regulators: Add monitorSensors support to Chassis
Implemented the monitorSensors() method in the Chassis class. This method
reads the sensors for the voltage rails produced by the chassis.
Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: Idb283b09c645983190601e030334399ee76c1995
diff --git a/phosphor-regulators/src/chassis.cpp b/phosphor-regulators/src/chassis.cpp
index a0d0c2b..29ebb79 100644
--- a/phosphor-regulators/src/chassis.cpp
+++ b/phosphor-regulators/src/chassis.cpp
@@ -55,4 +55,13 @@
}
}
+void Chassis::monitorSensors(System& system)
+{
+ // Monitor sensors in each device
+ for (std::unique_ptr<Device>& device : devices)
+ {
+ device->monitorSensors(system, *this);
+ }
+}
+
} // namespace phosphor::power::regulators