#
2a40e939 |
| 02-Sep-2020 |
Josh Lehan <krellan@google.com> |
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
Externa
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>
show more ...
|