PSUSensor: Add Offset attribute

The value of "Offset" is measured by power team and is considered as the
correctest calibration value for making the sensor reading value much
more precise on the platform.

Add the customizable attribute "Offset" to be able to adjust the raw
data and than update to the "Value" property on dbus.

Tested: Add the following configuration to entity-manager
        {
            "Address": "0x68",
            "Bus": "32",
            "Labels": [
                "vout1",
                "iout1",
                "pout1",
                "temp1"
            ],
            "Name": "onboard_p12v",
            "Thresholds": [
                ...
            ],
            "Type": "RAA228000",
            "iout1_Max": 108.0,
            "iout1_Offset": -0.25,
            "pout1_Max": 900.0,
            "pout1_Offset": -5.0,
            "vout1_Max": 13.0
        },
    - Check the reading value on dbus of this sensor is equal to the
      value we expected.

Signed-off-by: Jeff Lin <JeffLin2@quantatw.com>
Change-Id: Ia741c668e1d1939d2366f2b02553a465cd3c616b
3 files changed
tree: ca9ba9bf1c8e2e8dc3fad88388eb6e45bfb7ac61
  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. 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