Add PMBus device hwmon debug access type
This can be used to find a file in:
/sys/kernel/debug/pmbus/hwmonX/<device type>
For example: /sys/kernel/debug/pmbus/hwmon3/cffps1
Change-Id: Ifd9ae3a58f9097c89ebf80e3e19a180962968f0f
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/pmbus.cpp b/pmbus.cpp
index b68f6fb..6ec4965 100644
--- a/pmbus.cpp
+++ b/pmbus.cpp
@@ -62,9 +62,14 @@
return debugPath / "pmbus" / hwmonDir;
break;
case Type::DeviceDebug:
+ {
auto dir = driverName + "." + std::to_string(instance);
return debugPath / dir;
break;
+ }
+ case Type::HwmonDeviceDebug:
+ return debugPath / "pmbus" / hwmonDir / getDeviceName();
+ break;
}
}