commit | c0a0758034c655a78f307588895e63a5d4615abd | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Wed Oct 13 15:52:25 2021 +0000 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Mon Nov 08 22:20:16 2021 +0000 |
tree | df8759e59e199f767d712931d493189183ad6810 | |
parent | 886574cd772be492212cd5a1fde8bc2de8dabf9b [diff] |
psu-ng: Set the power-config-full-load GPIO The power-config-full-load GPIO is an optional GPIO that communicates to the HW the number of expected number of working PSUs. Reference: https://github.com/openbmc/docs/commit/2cbf57a8a0bb8d95b0e19b7fc27c4f95cbd8609a If the system implements this GPIO, set it to the appropriate value when the psu monitor app starts, and every time the system powers on in case the number of PSUs was changed when the system was powered off. In the GPIOReader constructor, move the error message from a journal log to the exception, otherwise this journal log will show up on all systems that do not implement this GPIO. Tested: Verified the correct value was set by reading the GPIO after writing by calling line.get_value() during testing. Verified the GPIOReader only displays the error message when a GPIO does not exist and the exception is not caught, no error messages are displayed for a missing power-config-full-load GPIO: Oct 14 20:54:27 p10bmc phosphor-psu-monitor[1152]: Failed to find line: Line does not exist: test-gpio Oct 14 20:54:27 p10bmc systemd[1]: phosphor-psu-monitor.service: Main process exited, code=exited, status=254/n/a Change-Id: Ifdcd9f552c28cec860b9b65a1133e179683fb0db Signed-off-by: Adriana Kobylak <anoo@us.ibm.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", }