regulators: Implements support for presence_detection

Enhance the configuration file parser to support the
presence_detection element.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I40ed2e849b6baaebdfd1899000fc389429d46543
diff --git a/phosphor-regulators/src/config_file_parser.hpp b/phosphor-regulators/src/config_file_parser.hpp
index e04f81f..771c699 100644
--- a/phosphor-regulators/src/config_file_parser.hpp
+++ b/phosphor-regulators/src/config_file_parser.hpp
@@ -492,6 +492,19 @@
     parsePMBusWriteVoutCommand(const nlohmann::json& element);
 
 /**
+ * Parses a JSON element containing a presence detection operation.
+ *
+ * Returns the corresponding C++ PresenceDetection object.
+ *
+ * Throws an exception if parsing fails.
+ *
+ * @param element JSON element
+ * @return PresenceDetection object
+ */
+std::unique_ptr<PresenceDetection>
+    parsePresenceDetection(const nlohmann::json& element);
+
+/**
  * Parses a JSON element containing a rail.
  *
  * Returns the corresponding C++ Rail object.