commit | d9cd7040e93337279c7d2939214f041e5f6ab447 | [log] [tgz] |
---|---|---|
author | Jeff Lin <JeffLin2@quantatw.com> | Fri Nov 20 15:49:28 2020 +0800 |
committer | Ed Tanous <ed@tanous.net> | Mon Apr 12 20:43:20 2021 +0000 |
tree | 6507f79f84c6c47cabc57d4afb9b273868688564 | |
parent | abf91de1876278b8b8f98787577a539804833ad4 [diff] |
ADCSensor: Add PollRate and fix PowerState Always If set "PowerState" as "On" then there will create the handler to check the host state is running or not. However, "PowerState" with default "always" will not create the handler and cause ADCSensor crashed by function isPowerOn when calling function checkThresholdsPowerDelay. For example, in our platform, we have only one ADCSensor which is for p3v battery and need to be updated once per day. Tested: Test the threshold low/high for the following test case by using "busctl set-property" to trigger threshold event and checking the time in "ipmitool sel elist". 1. one sensor with PowerState is Always: When trigger low threshold it will delay 5 seconds to assert threshold event and the service is still alive. When trigger high threshold it will immediately assert the threshold event. 2. one sensor with other PowerState("On","BiosPost") will have the same behavior with case 1. Test the following polling time by adding log in function updateValue: PollRate not write in configuration: polling time is 0.5 sec. PollRate with zero (value 0): polling time is 0.5 sec. PollRate with negative value (value -1.0): polling time is 0.5 sec. PollRate with positive value (value 2.0): polling time is 2.0 sec. Signed-off-by: Jeff Lin <JeffLin2@quantatw.com> Change-Id: I9044dd3b3844161721134f30a4de3229602a9172
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