psu-ng: Add code to set ON_OFF_CONFIG
Add code that sends the appropriate ON_OFF_CONFIG mask for the power
supply power on operation.
Tested:
Ran gtest using x86sdk
Used simulator to change ON_OFF_CONFIG value, restarted service,
verified ON_OFF_CONFIG changed.
Used i2cget on hardware to change ON_OFF_CONFIG, restarted service,
verified ON_OFF_CONFIG changed.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: Ifd9d63fcd2e86a62b7358e08958b5e2dbd21db9f
diff --git a/phosphor-power-supply/power_supply.hpp b/phosphor-power-supply/power_supply.hpp
index 707a745..487fa53 100644
--- a/phosphor-power-supply/power_supply.hpp
+++ b/phosphor-power-supply/power_supply.hpp
@@ -65,6 +65,16 @@
void analyze();
/**
+ * Write PMBus ON_OFF_CONFIG
+ *
+ * This function will be called to cause the PMBus device driver to send the
+ * ON_OFF_CONFIG command. Takes one byte of data.
+ *
+ * @param[in] data - The ON_OFF_CONFIG data byte mask.
+ */
+ void onOffConfig(uint8_t data);
+
+ /**
* Write PMBus CLEAR_FAULTS
*
* This function will be called in various situations in order to clear