commit | b66ae50a93860ac0fee18cf65d09c0243dd089c4 | [log] [tgz] |
---|---|---|
author | Faisal Awada <faisal@us.ibm.com> | Sat Apr 01 18:30:32 2023 -0500 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Thu Apr 06 13:58:58 2023 +0000 |
tree | 2f7c0372b68c4946a25df467c6cb277080cbcfd0 | |
parent | 6ff01ae8ae7f48833065597d45c9e0fd2a1a578b [diff] |
psu-ng: Dynamically assign the device driver name Replaced hardcoded device driver name with a method to build the device driver name dynamically and assign it to a private data member. The dynamically built device driver name used during bind/unbind. Tested the changes in simulation and actual system, compared journalctl entries of phosphor-psu-monitor with modified phosphor-psu-monitor. The following test were conducted and verified same journal output: - Verified driver name assigned correcty to PSU - Good Machine Path - Removed Power Supply - Inserted Power Supply - Missing Power Supply Change-Id: Ic376d4ff058e9a2df1887468932faaa28d998960 Signed-off-by: Faisal Awada <faisal@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", }