pseq: Add Services parameter to getGPIOValues()

Add a Services parameter to the PowerSequencerDevice::getGPIOValues()
method in the phosphor-power-sequencer application.

The Services object implements reading GPIO values in the standard way
using the libgpiod interface.

Change-Id: Ia6d1f1a0919aa6f45405cbe8375f8cc37800b002
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
diff --git a/phosphor-power-sequencer/src/power_sequencer_device.hpp b/phosphor-power-sequencer/src/power_sequencer_device.hpp
index 7a8c1b3..4b3ada6 100644
--- a/phosphor-power-sequencer/src/power_sequencer_device.hpp
+++ b/phosphor-power-sequencer/src/power_sequencer_device.hpp
@@ -70,9 +70,10 @@
      * Throws an exception if the values could not be read or the device does
      * not support GPIO values.
      *
+     * @param services System services like hardware presence and the journal
      * @return GPIO values
      */
-    virtual std::vector<int> getGPIOValues() = 0;
+    virtual std::vector<int> getGPIOValues(Services& services) = 0;
 
     /**
      * Returns the value of the PMBus STATUS_WORD command for the specified
diff --git a/phosphor-power-sequencer/src/standard_device.cpp b/phosphor-power-sequencer/src/standard_device.cpp
index cc999c5..b49b67f 100644
--- a/phosphor-power-sequencer/src/standard_device.cpp
+++ b/phosphor-power-sequencer/src/standard_device.cpp
@@ -37,7 +37,7 @@
 
         // Get all GPIO values (if possible) from device.  They may be slow to
         // obtain, so obtain them once and then pass values to each Rail object.
-        std::vector<int> gpioValues = getGPIOValuesIfPossible();
+        std::vector<int> gpioValues = getGPIOValuesIfPossible(services);
 
         // Loop through all the rails checking if any detected a pgood fault.
         // The rails are in power-on-sequence order.
@@ -76,12 +76,12 @@
     return error;
 }
 
-std::vector<int> StandardDevice::getGPIOValuesIfPossible()
+std::vector<int> StandardDevice::getGPIOValuesIfPossible(Services& services)
 {
     std::vector<int> values{};
     try
     {
-        values = getGPIOValues();
+        values = getGPIOValues(services);
     }
     catch (...)
     {}
diff --git a/phosphor-power-sequencer/src/standard_device.hpp b/phosphor-power-sequencer/src/standard_device.hpp
index 3dbba2f..af7e29e 100644
--- a/phosphor-power-sequencer/src/standard_device.hpp
+++ b/phosphor-power-sequencer/src/standard_device.hpp
@@ -104,9 +104,10 @@
      * If the device does not support reading GPIO values or an error occurs, an
      * empty vector is returned.
      *
+     * @param services System services like hardware presence and the journal
      * @return GPIO values, or empty vector if values could not be read
      */
-    virtual std::vector<int> getGPIOValuesIfPossible();
+    virtual std::vector<int> getGPIOValuesIfPossible(Services& services);
 
     /**
      * Store pgood fault debug data in the specified additional data map.