cpusensor: change Min/Max values for power

minValue and maxValue are currently hardcoded for all cpusensors to
-128 and 127 respectively. There is no sense to have negative values for
power sensors but CPU power consumption can be higher than 127W.
Change Min/Max to 0...511 for power sensors.

Tested: busctl introspect xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/power/Average_Power_CPU0
 xyz.openbmc_project.Sensor.Value interface --                                        -
 .MaxValue                        property  d 511                                      emits-change
 .MinValue                        property  d 0                                        emits-change
 .Unit                            property  s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change
 .Value                           property  d 64.393                                   emits-change writable

Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Change-Id: I0dafdd657194b1b4d709ce093b658a89120f81f9
2 files changed
tree: 29e149a2974f35ad373fe10f622aa4bd05c61e20
  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