commit | c3324424b278e761497ea0e639ecc7bae5e1bcb6 | [log] [tgz] |
---|---|---|
author | Brandon Wyman <bjwyman@gmail.com> | Thu Mar 24 20:30:57 2022 +0000 |
committer | Brandon Wyman <bjwyman@gmail.com> | Thu Apr 28 17:27:22 2022 +0000 |
tree | 0c6df595c6c8ae23599d0a06781c37309afe0869 | |
parent | 00d45a5b72eb2739fde38b02ca34d20259e8a86a [diff] |
psu-ng: Power supply class updates for input history Update the meson files to include the record_manager with the phosphor-psu-monitor application. Since we do not want to blindly enable input history for all power supplies, base the enablement of the feature off of the driver name. Change the PowerSupply class to require the driver name be passed in, and pass that down via the PSUManager during the configuration determination. Add a server manager to the PSUManager to handle the INPUT HISTORY data that will be under /org/open_power/sensors. The INPUT_HISTORY command is handled via a sysfs file in binary format, so add in a readBinary() base function to allow for mock testing. Change-Id: Iea163892d5482e6f2dacacfbfa746f605af52ed5 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
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", }