commit | 20bf2c1c1240f50f746321005b34ee36039d993b | [log] [tgz] |
---|---|---|
author | Matt Spinler <spinler@us.ibm.com> | Tue Sep 14 11:07:07 2021 -0500 |
committer | Matt Spinler <spinler@us.ibm.com> | Wed Sep 15 16:30:06 2021 -0500 |
tree | 425caaac2ad5e3f5687e467d2440b479440a9742 | |
parent | 0c42f40e55fd4fe6274962ea17e804f49f5de19e [diff] |
HwmonTempSensor: Watch for InterfacesRemoved In the current code, if a temperature sensor is on a removable card and that card is removed, hwmontempsensor does not know it has been removed and will keep on trying to read the sensor, resulting in it reporting the sensor is in error state (Value = NaN and OperationalStatus.Functional = false). This isn't ideal because a) The device isn't in the system so why have a sensor for it and b) This error reading implies there is something wrong when there isn't. This commit adds support to remove the sensor from D-Bus when its entity manager configuration interface has been removed from D-Bus, which entity-manager will do when a currently passing probe statement no longer passes. This could happen, for example, when the EEPROM D-Bus property it was matching on is removed from D-Bus by the daemon that keeps EEPROM contents on D-Bus when it detects the EEPROM is no longer there. Tested: The D-Bus sensor lifetime matches the entity-manager configuration object lifetime. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2946e9adf8995abbfa977128a06a5eca84fb46f5
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