Update analyze function to check STATUS_WORD
The STATUS_WORD PMBus command response will be the start of the power
supply fault analysis. Update the analyze() function to read its value
and process (select) fault bits.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: If7274ad237c0604a56008676ae64804a5fd2854e
diff --git a/phosphor-power-supply/meson.build b/phosphor-power-supply/meson.build
index 9554dd9..922a67e 100644
--- a/phosphor-power-supply/meson.build
+++ b/phosphor-power-supply/meson.build
@@ -1,9 +1,10 @@
-executable(
+phosphor_psu_monitor = executable(
'phosphor-psu-monitor',
'main.cpp',
'psu_manager.cpp',
'power_supply.cpp',
+ 'util.cpp',
dependencies: [
sdbusplus,
sdeventplus,
@@ -14,3 +15,9 @@
libpower,
]
)
+
+power_supply = phosphor_psu_monitor.extract_objects('power_supply.cpp')
+
+if get_option('tests').enabled()
+ subdir('test')
+endif