Add power-utils

The power-utils is added to support psu code manager as vendor-specifc
tool.
In this commit, the util returns the PSU version based on the PSU
inventory path, where the inventory path are mapped to the PSU sysfs
device directory based on a json config.

Tested: Verify the version is returned correctly on Witherspoon:
           $ ./psutils --getversion \
           /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
           01100110
        And it returns non-zero when it fails to get the version without
        throwing exception.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ib60f3aa50ce581d55fe4cd62642f30398e25be83
7 files changed
tree: ad96c4824b29c132caa89b56b97898974a0bdeee
  1. example/
  2. org/
  3. phosphor-regulators/
  4. power-sequencer/
  5. power-supply/
  6. services/
  7. test/
  8. tools/
  9. .clang-format
  10. .gitignore
  11. argument.hpp
  12. device.hpp
  13. device_monitor.hpp
  14. elog-errors.hpp
  15. file.hpp
  16. gpio.cpp
  17. gpio.hpp
  18. LICENSE
  19. MAINTAINERS
  20. meson.build
  21. meson_options.txt
  22. names_values.hpp
  23. pmbus.cpp
  24. pmbus.hpp
  25. README.md
  26. utility.cpp
  27. utility.hpp
README.md

Code for detecting and analyzing power faults on Witherspoon.

To Build

To build this package, do the following steps:

    1. meson build
    2. ninja -C build

To clean the repository again run `rm -rf build`.