Stop the timer when the deasserted events occur

A timer will be started if there is any threshold asserted event occurs,
but it is not stopped when the deasserted occurs.
This causes additional asserted events.
Connected the timer with different threshold, and stop it if deasserted.

Tested:
Adjust the threshold value with ipmitool raw 4 0x26 command, there is no duplicated asserted sel log:
8 | 04/21/20 | 08:00:24 UTC | Voltage P3VBAT | Upper Non-critical going high | Asserted | Reading 3.04 > Threshold 2.57 Volts
9 | 04/21/20 | 08:00:26 UTC | Voltage P3VBAT | Upper Non-critical going high | Deasserted | Reading 3.04 > Threshold 3.28 Volts
a | 04/21/20 | 08:00:45 UTC | Voltage P3VBAT | Upper Non-critical going high | Asserted | Reading 3.04 > Threshold 2.57 Volts
b | 04/21/20 | 08:00:48 UTC | Voltage P3VBAT | Upper Non-critical going high | Deasserted | Reading 3.04 > Threshold 3.28 Volts

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Ia218320c29c34e0bf9ef0604934e04cf0a5701dd
2 files changed
tree: 9ee057f6896c46ef5be5ac1e7f2855fe79af5ce1
  1. cmake/
  2. include/
  3. service_files/
  4. src/
  5. tests/
  6. .clang-format
  7. .clang-ignore
  8. .gitignore
  9. cmake-format.json
  10. CMakeLists.txt
  11. Jenkinsfile
  12. LICENSE
  13. MAINTAINERS
  14. README.md
README.md

dbus-sensors

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.

key features

  • 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