commit | 837ece7cdfb2654da19f91612e064041cb7bcce9 | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Thu Apr 22 13:21:08 2021 -0500 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Tue Apr 27 19:06:12 2021 +0000 |
tree | 290d8ac2e6af1f39d101f62f749e8e61e389d69f | |
parent | cb091801fc0a6bfb11b032461f1e216a6dd25e05 [diff] |
regulators: Create DBusSensor class Create the DBusSensor class that represents a voltage regulator sensor on D-Bus. Each voltage rail in the system may provide multiple types of sensor data, such as temperature, output voltage, and output current. A DBusSensor tracks one of these data types for a voltage rail. Class supports the following sensor operations: * Create sensor * Set sensor value * Disable sensor (when system is powered off) * Set sensor to error state (when unable to read value due to I2C error) * Delete sensor Note: A different class will implement the ObjectManager interface for all voltage regulator sensors. That will be in a future commit. Tested: * Created a sensor of each supported type (vout, iout, etc.) * Set the value of a sensor * Tested update policies: hysteresis, highest, lowest * Disabled a sensor * Set a sensor to the error state * Verified all D-Bus signals emitted * InterfacesAdded signal emitted with all info when sensor created * PropertiesChanged signal emitted when sensor properties change * InterfacesRemoved signal emitted when sensor deleted * See https://gist.github.com/smccarney/5ae989da1977162ae1a21c208d5302fc for complete test plan. Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I655277e6bf0a31a8778a54e87d5864f9951b045e
This repository contains applications for configuring and monitoring devices that deliver power to the system.
To build all applications in this repository:
meson build ninja -C build
To clean the repository and remove all build output:
rm -rf build
You can specify meson options to customize the build process. For example, you can specify:
Several applications in this repository require a PSU JSON config to run. The JSON config file provides information for:
There is an example psu.json to describe the necessary configurations.
inventoryPMBusAccessType
defines the pmbus access type, which tells the service which sysfs type to use to read the attributes. The possible values are:/sys/bus/i2c/devices/3-0069/
/sys/bus/i2c/devices/3-0069/hwmon/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/cffps1/
fruConfigs
defines the mapping between the attribute file and the FRU inventory interface and property. The configuration example below indicates that the service will read part_number
attribute file from a directory specified by the above pmbus access type, and assign to PartNumber
property in xyz.openbmc_project.Inventory.Decorator.Asset
interface."fruConfigs": [ { "propertyName": "PartNumber", "fileName": "part_number", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset" } ]
psuDevices
defines the kernel device dir for each PSU in inventory. The configuration example below indicates that powersupply0
's device is located in /sys/bus/i2c/devices/3-0069
."psuDevices": { "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069", }