psu-ng: Get the power config full load property

The supported configuration schema now includes the PowerConfigFullLoad
property to indicate the value that the power-config-full-load GPIO
should be set to for systems that support it.

Reference:
https://github.com/openbmc/docs/blob/master/designs/device-tree-gpio-naming.md#power-config-full-load

Change-Id: I590b9f2aff310f6175b9e66b507423dea0d0a3b4
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/phosphor-power-supply/psu_manager.cpp b/phosphor-power-supply/psu_manager.cpp
index 0d12dbc..78d380a 100644
--- a/phosphor-power-supply/psu_manager.cpp
+++ b/phosphor-power-supply/psu_manager.cpp
@@ -222,6 +222,19 @@
             }
         }
 
+        // The PowerConfigFullLoad is an optional property, default it to false
+        // since that's the default value of the power-config-full-load GPIO.
+        sys.powerConfigFullLoad = false;
+        propIt = properties.find("PowerConfigFullLoad");
+        if (propIt != properties.end())
+        {
+            const bool* fullLoad = std::get_if<bool>(&(propIt->second));
+            if (fullLoad != nullptr)
+            {
+                sys.powerConfigFullLoad = *fullLoad;
+            }
+        }
+
         supportedConfigs.emplace(*model, sys);
     }
     catch (const std::exception& e)