Find hwmon instances from OF device paths

Provide a method that scans the hwmon subtree for a matching
open firmware device path.

Change-Id: Ic71dea90113c6894d9d2b61e03bd02f6b550e1e6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/sysfs.hpp b/sysfs.hpp
index b9148da..690cf77 100644
--- a/sysfs.hpp
+++ b/sysfs.hpp
@@ -27,4 +27,17 @@
     return path + "/"s + type + id + "_"s + entry;
 }
 
+
+/** @brief Find hwmon instances
+ *
+ *  Look for a matching hwmon instance given an
+ *  open firmware device path.
+ *
+ *  @param[in] ofNode- The open firmware device path.
+ *
+ *  @returns[in] - The hwmon instance path or an empty
+ *                 string if no match is found.
+ */
+std::string findHwmon(const std::string& ofNode);
+
 // vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4