Support MAX34451, fix sensor type, enum issues

Add support for MAX34451 power sequencers, as well as fix some issues
with substring matching with regards to hwmon file prefix (sensor type)
and hwmon file suffix (sensor enumeration).
e.g vout11 , vout would be the sensor type and 11 would be the
enumeration.
Test:
Reboot BMC on a system with a MAX34451 present
which published the following sysfs hwmon labels,
e.g grep -H "" /sys/class/hwmon/hwmonXX/*_label
in10_label:vout12
in11_label:vout13
in12_label:vout16
in1_label:vout1
in2_label:vout2
in3_label:vout4
in4_label:vout5
in5_label:vout6
in6_label:vout7
in7_label:vout9
in8_label:vout10
in9_label:vout11
then did dbusctl --no-pager tree xyz.openbmc_project.PSUSensor
and saw the correct corresponding output voltage paths.
Before the patch having an enumeration > 9 would cause issues.

Change-Id: I9a82eea11f54266003c673013d0fed131f2f11fc
Signed-off-by: Jason Ling <jasonling@google.com>
3 files changed
tree: 286afd6bdc7531d39e82b84561fdc4558445558e
  1. cmake/
  2. include/
  3. service_files/
  4. src/
  5. tests/
  6. .clang-format
  7. .clang-ignore
  8. .gitignore
  9. cmake-format.json
  10. CMakeLists.txt
  11. Jenkinsfile
  12. LICENSE
  13. MAINTAINERS
  14. README.md
README.md

dbus-sensors

dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.

key features

  • runtime re-configurable from d-bus (entity-manager or the like)

  • isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible

  • async single-threaded: uses sdbusplus/asio bindings

  • multiple data inputs: hwmon, d-bus, direct driver access