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/ucd90160_device.hpp b/phosphor-power-sequencer/src/ucd90160_device.hpp
index 4b62766..fa7c5e9 100644
--- a/phosphor-power-sequencer/src/ucd90160_device.hpp
+++ b/phosphor-power-sequencer/src/ucd90160_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 UCD90160Device(std::vector<std::unique_ptr<Rail>> rails,
- Services& services, uint8_t bus, uint16_t address) :
- UCD90xDevice(deviceName, std::move(rails), services, bus, address)
+ explicit UCD90160Device(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{"UCD90160"};