commit | 8b098b9760b4268b2725f10a5553f0d9b7f0d4b7 | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Mon Aug 05 14:17:34 2024 -0500 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Thu Aug 08 14:16:23 2024 -0500 |
tree | 1854e929e4325f8281670e1bc9b47e887f15a190 | |
parent | 716366aecc075ea4bd5d050f33b6fb9791256f0e [diff] |
Add support for re-finding interfaces/system types The DBusInterfacesFinder class simplifies the task of finding interface instances on D-Bus. Similarly, the CompatibleSystemTypesFinder class simplifies the task of finding the list of compatible system types for the current system. Both classes initially find the D-Bus objects that already exist at the time the classes are constructed. They use InterfacesAdded listeners to find new D-Bus objects that are created later. This behavior handles most use cases. However, sometimes a caller may not be receiving D-Bus signals, but they still need to find new D-Bus objects that have been created. For example, the caller may be looping within a timeout period waiting for a D-Bus object to be created. To handle this use case, add `refind()` methods to both classes that will re-find all matching D-Bus objects that now exist, including those created since the classes were constructed. Tested: * DBusInterfacesFinder * Verify finds all interface instances that exist at time class is constructed * None found * Instances found * Verify finds new interface instances via InterfacesAdded listener * Verify refind() finds all interface instances, including those that were created after the class was constructed. * None found * Instances found * CompatibleSystemTypesFinder * Verify finds all compatible system type lists that exist at time class is constructed * None found * Lists found * Verify finds new compatible system type lists via InterfacesAdded listener * Verify refind() finds all compatible system type lists, including those that were created after the class was constructed. * None found * Lists found Change-Id: I975b37524f687e6d2f3d4ff48abb5e4486a84bfe Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
This repository contains applications for configuring and monitoring devices that deliver power to the system.
Actively-maintained applications:
Legacy applications:
To build all applications in this repository:
meson setup 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/<driver>.<instance>/
/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", }