psu-ng: Read and validate input voltage

Read the input voltage reported by pmbus for each PSU. Determine the
actual voltage based on predefined thresholds. Then validate the actual
voltage is supported for the PSU model.

Tested:
Verified in Rainier 2U that the 2 present PSUs had a pmbus
voltage value of 208000 mV, which is then translated to a 220V PSU, and
that value is validated against the supported configuration.
Verified the additional data strings by printing them with debug
statements:
Aug 05 18:50:15 p10bmc phosphor-psu-monitor[3615]: ACTUAL_VOLTAGE: 208.000000
Aug 05 18:50:15 p10bmc phosphor-psu-monitor[3615]: CALLOUT_INVENTORY_PATH:
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
Aug 05 18:50:15 p10bmc phosphor-psu-monitor[3615]: EXPECTED_VOLTAGE: 220

Change-Id: Ic8c3b567c8265e90bce420f98ac6f1e131ff713b
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/pmbus.hpp b/pmbus.hpp
index ea2b297..4bdc23f 100644
--- a/pmbus.hpp
+++ b/pmbus.hpp
@@ -11,6 +11,24 @@
 
 namespace fs = std::filesystem;
 
+// The file name Linux uses to capture the READ_VIN from pmbus.
+constexpr auto READ_VIN = "in1_input";
+
+namespace in_input
+{
+// VIN thresholds in Volts
+constexpr auto VIN_VOLTAGE_MIN = 20;
+constexpr auto VIN_VOLTAGE_110_THRESHOLD = 160;
+
+// VIN actual values in Volts
+// VIN_VOLTAGE_0:   VIN < VIN_VOLTAGE_MIN
+// VIN_VOLTAGE_110: VIN_VOLTAGE_MIN < VIN < VIN_VOLTAGE_110_THRESHOLD
+// VIN_VOLTAGE_220: VIN_VOLTAGE_110_THRESHOLD < VIN
+constexpr auto VIN_VOLTAGE_0 = 0;
+constexpr auto VIN_VOLTAGE_110 = 110;
+constexpr auto VIN_VOLTAGE_220 = 220;
+} // namespace in_input
+
 // The file name Linux uses to capture the STATUS_WORD from pmbus.
 constexpr auto STATUS_WORD = "status0";