commit | c7a1ae6b02e767174f5efc0520f763a448c58c4c | [log] [tgz] |
---|---|---|
author | Konstantin Aladyshev <aladyshev22@gmail.com> | Fri Apr 30 08:50:43 2021 +0000 |
committer | Ed Tanous <ed@tanous.net> | Fri Aug 27 18:26:40 2021 +0000 |
tree | 24e7ca2797fc3e459ecee95b94ea7cc478c567e7 | |
parent | d653b75cd14493150b3823acb8eeeff1218c6284 [diff] |
psusensor: Add support for the 'PowerState' parameter When CPU is powered off, some sensor reading values are expected to go below low thresholds. To prevent unnecessary sensor readings and redundant threshold event trigger in cases like that add support for the 'PowerState' JSON configuration parameter similar to other 'dbus-sensors' apps. Use 'checkThresholdsPowerDelay' function in a threshold check like it is done in ADCSensor app. This is necessary as PSU data can drop faster than a change in a power state is noticed. Tested on the AMD EthanolX CRB with ISL68137: When the PowerState is set to "On" and the platform is powered off, no transactions are observed on the corresponding I2C bus. When the PowerState is set to "Always" monitoring is always enabled and I2C transactions are always observed regardless the platform power state. These commands were used to monitor transactions on the I2C bus: $ echo 1 > /sys/kernel/debug/tracing/tracing_on $ echo 1 > /sys/kernel/debug/tracing/events/i2c/i2c_read/enable $ cat /sys/kernel/debug/tracing/trace_pipe Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Change-Id: Ic7b36e48828adf4eb2f7714965a4a1df4eb5ac3e
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