commit | 2a40e939307c5ffccf19b19d500eac5935c63009 | [log] [tgz] |
---|---|---|
author | Josh Lehan <krellan@google.com> | Wed Sep 02 11:48:14 2020 -0700 |
committer | Ed Tanous <edtanous@google.com> | Fri Jan 29 10:13:57 2021 -0800 |
tree | 43bd5177c2392eec55cae2e5af32942685a1a42d | |
parent | a3e8f2a391f389ffb2c379ca0c181e67de43824e [diff] |
ExternalSensor: New service for external sensors This code was mostly copied from HwmonTempSensor, and inspired by the initial proof of concept from https://gerrit.openbmc-project.xyz/35476 External sensors are designed to be placeholders, with no hwmon or other hardware support locally. Thus, there is no detection or kernel driver load, so no change is necessary to entity-manager. The expectation is that these sensors will be updated by something external to the BMC, such as the host, which can be useful for including host-based sensors into phosphor-pid-control thermal zones. * Added systemd service file, similar to the others. * Added CMakeLists blocks, similar to the others. * Also cleaned up some nearby formatting in CMakeLists. Tested: With the addition of the Mutable feature from 36275, and the installation of the systemd file from 36272, and a change to our IPMI daemon (still in the process of being upstreamed), the host can write to a sensor over IPMI. It correctly shows up in the IPMI SDR, and the written value correctly shows up on the D-Bus ExternalSensor here. Here is example JSON for use with entity-manager: { "Name": "HostOnlyDevTemp", "Measure": "temperature", "MinValue": -10.0, "MaxValue": 117.5, "Type": "ExternalSensor" }, Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Id499e1cd6c7918179bb1729e5ce8546cf4121dfa Signed-off-by: Ed Tanous <edtanous@google.com>
dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.
runtime re-configurable from d-bus (entity-manager or the like)
isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible
async single-threaded: uses sdbusplus/asio bindings
multiple data inputs: hwmon, d-bus, direct driver access