pseq: Move bus/addr higher in class hierarchy
Update the PowerSequencerDevice class hierarchy within the
phosphor-power-sequencer application.
The I2C bus and address for the power sequencer device(s) in the system
are now defined in the JSON configuration file.
Move the I2C bus and address properties to the top of the
PowerSequencerDevice class hierarchy.
For sub-classes that already had these properties, order the constructor
parameters to match the order in the JSON.
Tested:
* Ran automated test cases
Change-Id: Ida6886cbc62a9c8abd3bed294f6ddcd1851ccd62
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
diff --git a/phosphor-power-sequencer/src/ucd90320_device.hpp b/phosphor-power-sequencer/src/ucd90320_device.hpp
index c52c6ce..cadcbf6 100644
--- a/phosphor-power-sequencer/src/ucd90320_device.hpp
+++ b/phosphor-power-sequencer/src/ucd90320_device.hpp
@@ -48,14 +48,15 @@
/**
* Constructor.
*
- * @param rails Voltage rails that are enabled and monitored by this device
- * @param services System services like hardware presence and the journal
* @param bus I2C bus for the device
* @param address I2C address for the device
+ * @param rails Voltage rails that are enabled and monitored by this device
+ * @param services System services like hardware presence and the journal
*/
- explicit UCD90320Device(std::vector<std::unique_ptr<Rail>> rails,
- Services& services, uint8_t bus, uint16_t address) :
- UCD90xDevice(deviceName, std::move(rails), services, bus, address)
+ explicit UCD90320Device(uint8_t bus, uint16_t address,
+ std::vector<std::unique_ptr<Rail>> rails,
+ Services& services) :
+ UCD90xDevice(deviceName, bus, address, std::move(rails), services)
{}
constexpr static std::string deviceName{"UCD90320"};