commit | 7c424807216cf276fb247954060561030720ea4e | [log] [tgz] |
---|---|---|
author | Matt Spinler <spinler@us.ibm.com> | Fri May 04 10:52:40 2018 -0500 |
committer | Matt Spinler <spinler@us.ibm.com> | Mon May 07 21:19:53 2018 +0000 |
tree | 9e8a3c0342e6a75db0584295732423965d2ad62c | |
parent | c897d8bb66ff98882a5f5c4df5afb94d678f61d4 [diff] |
Support indirections other than just "label" The current code only allowed the MODE_<type><Num> env var to be "label" when doing DBus naming indirection. Add support to allow it to be anything, and then use that value to do the lookup. For example, if MODE_temp1 = "foo", then the code will read the temp1_foo file to find the value to append to LABEL to find the DBus object name. So if temp1_foo contained a 42, then the code will use the LABEL_temp42 var to find the object name. Tested: Test on the OpenPower OCC device which use 'label' and now 'function_id' for the indirections. Change-Id: I1f3115a2d37d008efca74748ac7eff8434d8320a Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Exposes generic hwmon entries as DBus objects.
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`.
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.