| commit | d26e27748c2b614950d30ca85891de18c364da0a | [log] [tgz] |
|---|---|---|
| author | Matthew Barth <msbarth@us.ibm.com> | Thu Mar 22 14:24:06 2018 -0500 |
| committer | Matt Spinler <spinler@us.ibm.com> | Fri Apr 13 14:33:41 2018 +0000 |
| tree | 77604fa31346e01c62af7ded8bfc7ec65954520f | |
| parent | 1daaf26afe0fe1add45393ef25937bcecf8f2b82 [diff] |
Store sensor return codes for dbus removal
Add any return codes defined at the device level and/or the sensor
within the hwmon device config file for removal of the sensor.
The sensor is removed from dbus when any of those return codes given are
received by hwmon when doing a read.
ex.)
Removal return codes 2 & 11 defined at device level apply for all
sensors(gpu0 core & mem) whereas removal return code 5 applies to only
the the gpu0 core temp sensor.
REMOVERCS = "2,11"
LABEL_temp1 = "gpu0_core_temp"
WARNHI_temp1 = "75000"
WARNLO_temp1 = "0"
CRITHI_temp1 = "80000"
CRITLO_temp1 = "0"
REMOVERCS_temp1 = "5"
LABEL_temp2 = "gpu0_mem_temp"
WARNHI_temp2 = "75000"
WARNLO_temp2 = "0"
CRITHI_temp2 = "80000"
CRITLO_temp2 = "0"
Tested:
All device sensors contain removal return code defined on the device
Each sensor contains removal return codes defined on them
Change-Id: Ib0bf1e38ae40aaaea06e93d96322f9499eeefdb1
Signed-off-by: Matthew Barth <msbarth@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.