All sensors should return a target speed value

All tach sensors associated with a fan should return a target speed
sensor from its getTarget function. In the case where a target speed
sensor does not exist for the tach sensor, it retrieves and returns the
target speed value from the fan where the fan finds the target speed
value from a tach sensor the fan contains that provides it.

Resolves openbmc/openbmc#2784

Change-Id: Iea5561b0aad6942be52af262c7255c60e5e75c7a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/monitor/fan.hpp b/monitor/fan.hpp
index f22bd9f..d765650 100644
--- a/monitor/fan.hpp
+++ b/monitor/fan.hpp
@@ -134,15 +134,28 @@
             return _name;
         }
 
+        /**
+         * @brief Finds the target speed of this fan
+         *
+         * Finds the target speed from the list of sensors that make up this
+         * fan. At least one sensor should contain a target speed value.
+         *
+         * @return - The target speed found from the list of sensors on the fan
+         */
+        uint64_t findTargetSpeed();
+
     private:
 
         /**
-         * @brief Returns the target speed of the sensor
+         * @brief Returns the target speed of the fan
          *
-         * If the sensor itself doesn't have a target, it finds
-         * the target speed from another sensor.
+         * Retrieves the target speed using the given sensor which may or may
+         * not contain a target speed value. The sensor determines what its
+         * target speed is.
          *
-         * @param[in] sensor - the sensor to get the target speed for
+         * @param[in] sensor - The sensor to use in getting the target speed
+         *
+         * @return - The target speed of the fan
          */
         uint64_t getTargetSpeed(const TachSensor& sensor);