Fan: Optimize the pwm sensor creation

Given fan*_input and its corresponding pwm* hwmon sys files are always
under the same diretory, we should use that directory to generate the
pwm sensor rather than deduce it from scratch. This also fixes all
kind of issues that come into play when multiple fan hwmon controllers
exisit on the system.

Tested: the tach and pwm sensors continue to be the same as before.

Change-Id: I54a4059e47190cb9f66e9e11a9f9a373ebf0fc16
Signed-off-by: Yong Zhao <yozhao@google.com>
1 file changed
tree: d6757a88def718c424b0aa96f699af91d3701327
  1. include/
  2. service_files/
  3. src/
  4. tests/
  5. .clang-format
  6. .clang-ignore
  7. .gitignore
  8. Jenkinsfile
  9. LICENSE
  10. MAINTAINERS
  11. meson.build
  12. meson_options.txt
  13. 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