commit | 47fb49ac4af2b34d2a3d5e2aa062cbb7a7273864 | [log] [tgz] |
---|---|---|
author | Lakshmi Yadlapati <lakshmiy@us.ibm.com> | Thu Oct 19 14:47:08 2023 -0500 |
committer | Lakshmi Yadlapati <lakshmiy@us.ibm.com> | Thu Nov 30 22:02:59 2023 +0000 |
tree | 7b3db87acdcbbeef7ec8b9eb2678b9cada5528a5 | |
parent | 58bd8ba875c772e0b7e234e02f36483718215077 [diff] |
sensor: Implement sensor "PRIORITY" This commit introduces the `xyz.openbmc_project.Common.Priority` interface to define the priority of sensors. If a sensor's priority attribute is specified, this interface is created with the 'priority' attribute. However, if the priority attribute is not specified, this interface is not created. The `xyz.openbmc_project.Common.Priority` interface is used to indicate the priority level of fan sensors. It provides information about primary and secondary RPM sensors for dual rotor fans, allowing for a more specific description of the sensor's priority. phosphor-dbus-interfaces commit: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/66779 Tested: Build phosphor-hwmon successfully ''' 1. Retrieve the priority level of the secondary sensor busctl introspect xyz.openbmc_project.Hwmon-xxx .Hwmon1 \ /xyz/openbmc_project/sensors/fan_tach/fan1_1 xyz.openbmc_project.Common.Priority NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Priority property u 1 emits-change writable 2. If the "PRIORITY" is not specified in the sensor's configuration file busctl introspect xyz.openbmc_project.Hwmon-xxx .Hwmon1 \ /xyz/openbmc_project/sensors/fan_tach/fan1_0 xyz.openbmc_project.Common.Priority NAME TYPE SIGNATURE RESULT/VALUE FLAGS 3. Change the sensor priority busctl set-property xyz.openbmc_project.Hwmon-xxx.Hwmon1 \ /xyz/openbmc_project/sensors/fan_tach/fan1_1 xyz.openbmc_project.Common.Priority \ Priority u 0 busctl introspect xyz.openbmc_project.Hwmon-xxx .Hwmon1 \ /xyz/openbmc_project/sensors/fan_tach/fan1_1 xyz.openbmc_project.Common.Priority NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Priority property u 0 emits-change writable ''' Change-Id: I7a226cf105756bc32e04f6724428d93e84dfb72a Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Exposes generic hwmon entries as DBus objects. More information can be found at Sensor Architecture
To build this package, do the following steps:
To clean the repository run rm -rf build
.
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 a meson configurable prefix (BUSNAME_PREFIX=xyz.openbmc_project
by default), ID is either a std::hash
of the /sys/devices
path backing the hwmon class instance or provided suffix value from the command line, and N is the implemented phosphor-hwmon D-Bus API version.