pseq: Add named GPIO properties
Add the new named GPIO properties from the JSON config file to the
power sequencer device class hierarchy.
New JSON GPIO properties:
* power_control_gpio_name
* power_good_gpio_name
Power sequencer device class hierarchy:
* PowerSequencerDevice (power_sequencer_device.*)
* StandardDevice (standard_device.*)
* PMBusDriverDevice (pmbus_driver_device.*)
* UCD90xDevice (ucd90x_device.*)
* UCD90160Device (ucd90160_device.*)
* UCD90320Device (ucd90320_device.*)
Tested:
* Ran automated tests. All ran successfully.
Change-Id: Idcccee89eb09cb7d135f45aeb4f6dfe8299adf43
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
diff --git a/phosphor-power-sequencer/src/pmbus_driver_device.hpp b/phosphor-power-sequencer/src/pmbus_driver_device.hpp
index 9e77626..c6b6369 100644
--- a/phosphor-power-sequencer/src/pmbus_driver_device.hpp
+++ b/phosphor-power-sequencer/src/pmbus_driver_device.hpp
@@ -56,6 +56,10 @@
* @param name Device name
* @param bus I2C bus for the device
* @param address I2C address for the device
+ * @param powerControlGPIOName Name of the GPIO that turns this device on
+ * and off
+ * @param powerGoodGPIOName Name of the GPIO that reads the power good
+ * signal from this device
* @param rails Voltage rails that are enabled and monitored by this device
* @param services System services like hardware presence and the journal
* @param driverName Device driver name
@@ -63,9 +67,12 @@
*/
explicit PMBusDriverDevice(
const std::string& name, uint8_t bus, uint16_t address,
+ const std::string& powerControlGPIOName,
+ const std::string& powerGoodGPIOName,
std::vector<std::unique_ptr<Rail>> rails, Services& services,
const std::string& driverName = "", size_t instance = 0) :
- StandardDevice(name, bus, address, std::move(rails)),
+ StandardDevice(name, bus, address, powerControlGPIOName,
+ powerGoodGPIOName, std::move(rails)),
driverName{driverName}, instance{instance}
{
pmbusInterface =