commit | 3cd2b407131b5f0111c3a1c50383f34f84f6f27f | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Sat Jan 30 15:35:58 2021 -0600 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Sat Jan 30 17:05:10 2021 -0600 |
tree | f84751a82f36f37bd51326d2539c98f1f6bc4be7 | |
parent | 48033bf62871ac8c2572cebdfb4d5aab31e41f71 [diff] |
regulators: Handle expected D-Bus exceptions When hardware is not present, it can appear multiple ways on D-Bus: * Object path does not exist * Object path exists, but Inventory.Item interface not implemented * Inventory.Item interface implemented with Present value of false The first two cases result in a D-Bus exception being thrown when trying to obtain the value of the Present property. Enhance the DBusPresenceService class to catch these exceptions and treat them as a false Presence value. Tested: * Tested where hardware present * Tested where hardware not present * Object path and interface/property exist * Object path exists * Object path does not exist * For full test plan, see https://gist.github.com/smccarney/d3d7384700abcc5abf436e2b859d98e5 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I543a4c16984dea3657b8024dedd1060dda4319e2
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", }