9bab9e10 | 24-Feb-2021 |
Adriana Kobylak <anoo@us.ibm.com> |
psu-ng: Get max PSU number from entity manager
Read the max number of PSUs supported from entity manager instead of JSON since entity manager would have the value based on system. If the entity mana
psu-ng: Get max PSU number from entity manager
Read the max number of PSUs supported from entity manager instead of JSON since entity manager would have the value based on system. If the entity manager interface does not exist by the time the psu manager starts, subscribe to interfaces added. The psu manager can take action once the max count property is available on D-Bus.
Tested: On Rainier 2U with debug traces: 1. Restarted phosphor-psu-monitor and verified maxPowerSupplies was 2. 2. Stopped xyz.openbmc_project.Inventory.Manager. Restarted phosphor-psu-monitor and verified maxPowerSupplies was 0. 3. Started xyz.openbmc_project.Inventory.Manager and verified the psu callback was triggered setting maxPowerSupplies to 2. 4. Stopped and started xyz.openbmc_project.Inventory.Manager and verified the psu callback was not called again.
Change-Id: Ieff796ca5c79bfddc1fc6e15e339a0b15eb422d7 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
aed1f75d | 25-Nov-2019 |
Brandon Wyman <bjwyman@gmail.com> |
psu: Updates for power supply presence
Update the JSON file to indicate the minimum and maximum number of power supplies this system can have.
Update the JSON file to have an array of power supply
psu: Updates for power supply presence
Update the JSON file to indicate the minimum and maximum number of power supplies this system can have.
Update the JSON file to have an array of power supply objects, each with their various own properties. Each power supply will have: 1) An associated D-Bus path for the inventory. This will have the Present property. 2) An associated I2C bus number. 3) An associated I2C bus adddress.
Update PowerSupply class to have a present member variable, an isPresent() accessor function, and two functions for updating the presence. One function will be the call back function for either inventory change events or interface added events, which will use associated match member variables. The second function being one that attempts to read the inventory Present property on startup. If reading the Present property on startup fails, the property changed or interface added events should work to get the value when that property is available.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Ib34510a6da66ba1b8f1e927093b3d10b09beb410
show more ...
|