psu-ng: Change paths of SN/PN/FN files
The cffps2 power supply device driver started showing these fields under
new names in a different directory. Eventually, the ones in the
original location will be removed.
Old path: /sys/kernel/debug/pmbux/hwmonX/cffps2
New path: /sys/kernel/debug/pmbux/hwmonX
Old name New Name
-------------------------
fru mfr_model
part_number mfr_revision
header mfr_location
serial_number mfr_serial
Tested:
Compared the results of introspecting the PS inventory before and after
the changes as the application puts these 4 fields into the inventory.
Change-Id: I0614396c28c08df22d57f88f8be1920d63a10132
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/phosphor-power-supply/power_supply.cpp b/phosphor-power-supply/power_supply.cpp
index cea2ba2..b362a57 100644
--- a/phosphor-power-supply/power_supply.cpp
+++ b/phosphor-power-supply/power_supply.cpp
@@ -905,15 +905,14 @@
modelName = readVPDValue(CCIN, Type::HwmonDeviceDebug, CC_KW_SIZE);
assetProps.emplace(MODEL_PROP, modelName);
- pn = readVPDValue(PART_NUMBER, Type::HwmonDeviceDebug, PN_KW_SIZE);
+ pn = readVPDValue(PART_NUMBER, Type::Debug, PN_KW_SIZE);
assetProps.emplace(PN_PROP, pn);
- fn = readVPDValue(FRU_NUMBER, Type::HwmonDeviceDebug, FN_KW_SIZE);
+ fn = readVPDValue(FRU_NUMBER, Type::Debug, FN_KW_SIZE);
assetProps.emplace(SPARE_PN_PROP, fn);
- header =
- readVPDValue(SERIAL_HEADER, Type::HwmonDeviceDebug, HEADER_SIZE);
- sn = readVPDValue(SERIAL_NUMBER, Type::HwmonDeviceDebug, SERIAL_SIZE);
+ header = readVPDValue(SERIAL_HEADER, Type::Debug, HEADER_SIZE);
+ sn = readVPDValue(SERIAL_NUMBER, Type::Debug, SERIAL_SIZE);
assetProps.emplace(SN_PROP, header + sn);
fwVersion =
diff --git a/phosphor-power-supply/power_supply.hpp b/phosphor-power-supply/power_supply.hpp
index da6adad..c28c11e 100644
--- a/phosphor-power-supply/power_supply.hpp
+++ b/phosphor-power-supply/power_supply.hpp
@@ -21,10 +21,10 @@
#if IBM_VPD
// PMBus device driver "file name" to read for CCIN value.
constexpr auto CCIN = "ccin";
-constexpr auto PART_NUMBER = "part_number";
-constexpr auto FRU_NUMBER = "fru";
-constexpr auto SERIAL_HEADER = "header";
-constexpr auto SERIAL_NUMBER = "serial_number";
+constexpr auto PART_NUMBER = "mfr_revision";
+constexpr auto FRU_NUMBER = "mfr_model";
+constexpr auto SERIAL_HEADER = "mfr_location";
+constexpr auto SERIAL_NUMBER = "mfr_serial";
constexpr auto FW_VERSION = "fw_version";
// The D-Bus property name to update with the CCIN value.