Move value iface creation into sensor object

Create the Sensor.Value interface for a sensor within the sensor object.
Each sensor must have an input sysfs file to get a Value property on the
Sensor.Value interface and be included by hwmon.

Tested:
    No change in value interface creation for sensors

Change-Id: I09b1c79142ba2a34424f5ec29f41d19a987c84e7
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
3 files changed
tree: f971131502deaece0a26c9444c7ece911f7834a8
  1. msl/
  2. test/
  3. tools/
  4. .gitignore
  5. argument.cpp
  6. argument.hpp
  7. bootstrap.sh
  8. configure.ac
  9. env.cpp
  10. env.hpp
  11. fan_pwm.cpp
  12. fan_pwm.hpp
  13. fan_speed.cpp
  14. fan_speed.hpp
  15. hwmon.cpp
  16. hwmon.hpp
  17. hwmonio.cpp
  18. hwmonio.hpp
  19. interface.hpp
  20. LICENSE
  21. mainloop.cpp
  22. mainloop.hpp
  23. MAINTAINERS
  24. Makefile.am
  25. readd.cpp
  26. README.iio.md
  27. README.md
  28. sensor.cpp
  29. sensor.hpp
  30. sensorset.cpp
  31. sensorset.hpp
  32. sysfs.cpp
  33. sysfs.hpp
  34. targets.hpp
  35. thresholds.hpp
  36. timer.cpp
  37. timer.hpp
  38. types.hpp
  39. 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 clean the repository run `./bootstrap.sh clean`.

D-Bus bus names

To enable the use of Linux features like cgroups prioritization and
udev/systemd control, one instance of phosphor-hwmon is intended to
be run per hwmon sysfs class instance.

This requires an algorithm for selecting a stable, well-known D-Bus busname.

The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is an autoconf
configurable prefix (BUSNAME_PREFIX, xyz.openbmc_project by default),
ID is a std::hash of the /sys/devices path backing the hwmon class
instance, and N is the implemented phosphor-hwmon D-Bus API version.