commit | ca44c2e11fd6ee4849790c9d1bae930315039413 | [log] [tgz] |
---|---|---|
author | Matthew Barth <msbarth@us.ibm.com> | Tue Apr 24 15:33:25 2018 -0500 |
committer | Matthew Barth <msbarth@us.ibm.com> | Fri Apr 27 15:09:34 2018 -0500 |
tree | e5e9164df2f0af62699be3e0b2dc912647102958 | |
parent | 358193811e9769851e7f04816c3f5938f5a64f64 [diff] |
Fault status check before reading sensor value Checking for the fault sysfs file should be done prior to reading the input value when creating the sensor's dbus object. A sensor providing a fault sysfs file will have a status interface functional property created with its initial functional state. A sensor in a nonfunctional state when the object is created, will have an initial value of 0. The hwmon documentation states that when a sensor input channel presents an associated fault file, the measurement value provided for that channel should not be trusted when the fault boolean has a value of 1. Using an initial value of 0 follows this specification and allows the corresponding dbus object to be created. Tested: Faulted sensor at hwmon start shows functional status of false. Faulted sensor at hwmon start contains a sensor value of 0. Change-Id: I6388a3f84f638360b03e557aadc6de8331e67a69 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.