commit | cb091801fc0a6bfb11b032461f1e216a6dd25e05 | [log] [tgz] |
---|---|---|
author | Brandon Wyman <bjwyman@gmail.com> | Mon Apr 26 15:26:27 2021 -0500 |
committer | Brandon Wyman <bjwyman@gmail.com> | Mon Apr 26 15:54:32 2021 -0500 |
tree | 83ccadfddba8b5341fca224c154c60bee822bff6 | |
parent | e2f14a5748e2bedc926bdd7a855ff4fb368ae1a5 [diff] |
psu-ng: Call updateInventory() in PSU constructor After adding the changes to get configuration data from entity-manager, the timing with how processes start up changed a bit. We used to get bus, address, and inventory path information from the JSON file, created the power supplies, prior to the phosphor-gpio-presence application doing the interfaces added call for the Present property. Then we would get the interfaces added signal, which would call updateInventory(). With the entity-manager changes, it appears that we typically startup before the Presence interface added, and before the bus, address, and other information from entity-manager is ready. The Present property gets added, the entity-manager adds the IBMCFFPSConnector information, then we create the power suppplies, but now there is no call to updateInventory() as we missed the interfaces added signal for the Present property. We probably should have been calling updateInventory() in the constructor all this time. If the power supply is not present at that time, it just skips doing anything. If it is present, it will update the VPD properties on the D-Bus inventory interface. Tested: Created rainier image containing phosphor-power changes. Flashed image to Rainier 2S4U system. Removed powersupply* directories from /var/lib/phosphor-inventory-manager persisted data tree. Rebooted BMC. Verify D-Bus for powersupply* has VPD keyword properties updated. Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Iabff937b25910faeca6ffe8aa1f376132e514a81
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", }