adc: Only process CPUReq sensors when CPUs change

The adcsensor application watches for the Present property to change on
CPUs so that it can check if any ADC sensors that have the 'CPURequired'
configuration field need changes.

However, in this case it was also deleting and recreating non-CPU
related sensors, such as ones that measure the RTC battery voltage. This
is a problem because if that sensor is below threshold, it will behave
as if the threshold were newly asserted by emitting propertiesChanged
signals on the threshold alarm properties as well as emitting the
ThresholdAsserted signals again.

Fix this by changing the code to only process sensors that have the
CPURequired field when handling CPU presence changes.

Tested:
Check D-Bus signals when CPU presence changes versus when a threshold
configuration property changes and see the expected handling.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8f00726e71c85e70203a5cb6ee5dd99b4fe9e9c1
1 file changed
tree: e41b780806bab4f9188bbdd58a2cb6a6745602eb
  1. include/
  2. service_files/
  3. src/
  4. subprojects/
  5. tests/
  6. .clang-format
  7. .clang-ignore
  8. .clang-tidy
  9. .gitignore
  10. Jenkinsfile
  11. LICENSE
  12. MAINTAINERS
  13. meson.build
  14. meson_options.txt
  15. OWNERS
  16. 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

sensor documentation