Write pwmX_enable for fans that have a fanX_target

For fans that have a fanX_target hwmon sysfs attribute,
write the pwmX_enable on startup to put that fan into
RPM mode, which is safe to do because this application
requires that the target is written in RPMs.  The write
will only occur if the  pwm_enable file exists.

In the future, if fans with a target need to run in pwm
mode, this code will need to be updated to convert between
RPM and pwm anyway and the pwm_enable value can then
be different based on that.

Resolves openbmc/openbmc#1584

Change-Id: I4f6f3ac8d6651314367aaf5c51ac176220f1fba6
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
5 files changed
tree: 995f8a8aca0bc2be0fb2d045729ab46a4b052c2c
  1. test/
  2. .gitignore
  3. argument.cpp
  4. argument.hpp
  5. bootstrap.sh
  6. configure.ac
  7. env.cpp
  8. env.hpp
  9. fan_speed.cpp
  10. fan_speed.hpp
  11. hwmon.hpp
  12. interface.hpp
  13. LICENSE
  14. mainloop.cpp
  15. mainloop.hpp
  16. Makefile.am
  17. readd.cpp
  18. README.md
  19. sensorset.cpp
  20. sensorset.hpp
  21. sysfs.cpp
  22. sysfs.hpp
  23. targets.hpp
  24. thresholds.hpp
  25. util.hpp
README.md

Exposes generic hwmon entries as DBus objects.

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To full clean the repository again run `./bootstrap.sh clean`.