commit | 4e0402cb4ea19ffdede99172876de1fd444446df | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Fri Feb 05 00:08:33 2021 -0600 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Fri Feb 05 15:55:34 2021 -0600 |
tree | f9c3c8b7cb305b49d413d4287e533e3f0e96ec53 | |
parent | 3cd2b407131b5f0111c3a1c50383f34f84f6f27f [diff] |
regulators: Add VPD service The regulators application needs to obtain VPD (Vital Product Data) keyword values. Sometimes regulator configuration and monitoring varies depending on hardware type or version. VPD keyword values can provide this information about the hardware. Add a new class to obtain hardware VPD from the D-Bus xyz.openbmc_project.Inventory.Decorator.Asset interface. Also define an abstract base class and a mock implementation to enable use of gmock in test cases related to VPD. Tested: * Verified VPD values were successfully obtained from D-Bus. * Verified VPD values were cached. * Tested where object path was invalid. * Tested where keyword was invalid. * Verified cached VPD values were cleared when machine powered on. * For the complete test plan, see https://gist.github.com/smccarney/519a54353361e28b1d25f5783c15f471 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Id08e8bca8db6421d46669c495e8a9432e45a1fd6
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", }