commit | c9d61613d4365b8c0945a60a14fea69ed07d4b45 | [log] [tgz] |
---|---|---|
author | George Liu <liuxiwei@inspur.com> | Wed Oct 12 14:31:39 2022 +0800 |
committer | George Liu <liuxiwei@inspur.com> | Fri Oct 14 08:39:12 2022 +0800 |
tree | 33c511fdf421b804095e94c512ba440267b355f8 | |
parent | 5e5259bf6710f22d3b78667098e56fa0e4895160 [diff] |
sensor: Implement sensor "ACCURACY" Support the accuracy attribute of the sensor. Since the latest Redfish spec needs to support the accuracy attribute of the sensor, extend the configuration file syntax to support the accuracy value, read the value and publish it to the new D-Bus Accuracy interface. Also, This function will be synchronized to the dbus sensors repo in the future. Tested: Build phosphor-hwmon successfully eg: The configuration accuracy in power supply is 1 ~# busctl get-property xyz.openbmc_project.Hwmon-xxx.Hwmon1 /xyz/openbmc_project/sensors/power/ps0_input_power xyz.openbmc_project.Sensor.Accuracy Accuracy d 1 Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Idd0159b75a7506001cf886f4ae8a22dbd38b1135
Exposes generic hwmon entries as DBus objects. More information can be found at Sensor Architecture
To build this package, do the following steps: 1. meson build 2. ninja -C build 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 an autoconf 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.