Read fan target sysfs value on startup

When creating the object that represents the
Control.FanSpeed interface for a fan, read the
target fan speed out of sysfs and save it in
the object so it shows up in D-Bus immediately.

Previously the Target property would have a value
of zero until another application wrote it, leaving
a window where the D-Bus property wouldn't match
the underlying sysfs file value.

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