4fa67aa1 | 03-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: If152304b21dd2daaa2f79255a4f98218615efb05 Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: If152304b21dd2daaa2f79255a4f98218615efb05 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
3d0c3696 | 12-Dec-2024 |
Matt Spinler <spinler@us.ibm.com> |
control: Load only 1 pcie_cards.json
The pcie_cards.json file contains PCIe cards that need special fan floor values. The previous code would attempt to load multiple files, based on the thinking t
control: Load only 1 pcie_cards.json
The pcie_cards.json file contains PCIe cards that need special fan floor values. The previous code would attempt to load multiple files, based on the thinking that there might be a common file that is shared between systems and then other system specific files with just the cards that are different.
In practice this feature was never used, and made systems harder to patch in /etc/ since even after a file was found in /etc the file would also be loaded out of /usr, overwriting the values.
Tested: A file was put in each non default location of:
``` /etc/phosphor-fan-presence/control/ /etc/phosphor-fan-presence/control/com.ibm.Hardware.Chassis.Model.Rainier4U/
/usr/share/phosphor-fan-presence/control/ /usr/share/phosphor-fan-presence/control/com.ibm.Hardware.Chassis.Model.Rainier/ ```
With the existing file in flash at: /usr/share/ ... /com.ibm.Hardware.Chassis.Model.Rainier4U/
And in each case the correct file was chosen. Verified using the traces shown on startup like:
``` Loading configuration from /etc/phosphor-fan-presence/control/pcie_cards.json ```
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I14b849a2bff65402508ef92e293f3237729721e5
show more ...
|
dfddd648 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ica590f8613f1fb89ab1ca676ac51c1cc7e38d67f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
6781491c | 11-Jun-2024 |
Chau Ly <chaul@amperecomputing.com> |
control: json: Correct hysteresis definitions
The action target_from_group_max has been implementing the reversed definitions of positive hysteresis and negative hysteresis. The positive hysteresis
control: json: Correct hysteresis definitions
The action target_from_group_max has been implementing the reversed definitions of positive hysteresis and negative hysteresis. The positive hysteresis should be for the value increasing case and vice versa. This commit corrects that in source code and events.md.
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I1b84884d16d5f20d0fdcd9033188ffd31e91f907
show more ...
|
078c0a86 | 11-Jun-2024 |
Chau Ly <chaul@amperecomputing.com> |
control: manager: Services with no managed objs
When a D-Bus object used in events is under a service that has the "org.freedesktop.DBus.ObjectManager", the control::json::Manager will try to get al
control: manager: Services with no managed objs
When a D-Bus object used in events is under a service that has the "org.freedesktop.DBus.ObjectManager", the control::json::Manager will try to get all the managed objects under the service and add to cache. However, in case when the results from the GetManagedObjects are empty, it omits the attempt to directly read the object from D-Bus using the configured information.
This patch handles this situation and allows services that have the ObjectManager interface but empty managed objects can be read.
Example: Objects under xyz.openbmc_project.State.Host service.
root@mtmitchell-dcscm:~# busctl call xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 org.freedesktop.DBus.ObjectManager \ GetManagedObjects
a{oa{sa{sv}}} 0
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I5eca78fdfbc8a26fb7effb861440dc3cf28959d0
show more ...
|
51465352 | 09-Apr-2024 |
Matt Spinler <spinler@us.ibm.com> |
control:Bonnell: Remove hot PCIe cards
It turns out that Bonnell doesn't have any 'hot' pcie cards, so the floor can just be based on ambient and altitude.
This commit removes the cards from pcie_c
control:Bonnell: Remove hot PCIe cards
It turns out that Bonnell doesn't have any 'hot' pcie cards, so the floor can just be based on ambient and altitude.
This commit removes the cards from pcie_cards.json and removes any PCIe floor index values from the mapped_floor action in events.json. It still leaves the infrastructure to keep things more common with the other IBM systems, and to make it easier to add in a card if/when a hot one comes into plan.
There is also a code update needed to allow an empty pcie_cards.json file.
Tested: Floors are set appropriately based on the altitude and ambient.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I10e6904602c7abf61121f7c610059f164405b758
show more ...
|
7fa4d16e | 04-Jan-2024 |
Matt Spinler <spinler@us.ibm.com> |
control: Add optional delay to count_state_floor
Add an optional delay field to the count_state_floor action that takes a value in seconds. When set to a nonzero value, the action will then require
control: Add optional delay to count_state_floor
Add an optional delay field to the count_state_floor action that takes a value in seconds. When set to a nonzero value, the action will then require the count condition to be satisfied for that amount of time before setting the floor. This can be used to prevent the floor from jumping when there is just short change to a property value, for example if a sensor set to not functional for a short amount of time.
For example:
{ "name": "count_state_floor", "count": 1, "state": false, "delay": 5, "floor": 18000 }
This says that the floor won't be set to 18000 until at least 1 group member has its property value set to false for a continuous 5 seconds.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I67409ce651d9592b1cabb3f7cb36ba998c3ef545
show more ...
|
8d9c391a | 08-Nov-2023 |
Matt Spinler <spinler@us.ibm.com> |
control: Add power on/offs to flight recorder
Add entries for when the power state changes to the flight recorder. This can help provide context to other entries that may occur due to the power on/o
control: Add power on/offs to flight recorder
Add entries for when the power state changes to the flight recorder. This can help provide context to other entries that may occur due to the power on/off, as well as give a history of the state changes without needing to search journal output, if there is any.
Tested: ``` "Nov 08 18:04:53.922812: pcie_card_floors-58: Found 0 hot cards, 1 with temp sensors, 0 uninteresting", "Nov 08 18:05:12.104198: power: Power off", "Nov 08 18:05:24.830231: pcie_card_floors-58: Found 0 hot cards, 0 with temp sensors, 0 uninteresting", "Nov 08 18:08:24.172855: power: Power On", ```
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I7605401c1dac5162903e13ae8ad71de2928ddd13
show more ...
|
5e15c3ba | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I3e9e6350864ac267819a4b8d670bef7d3746976e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
2e22b235 | 24-Aug-2023 |
Matt Spinler <spinler@us.ibm.com> |
Remove remaining fmt::format use
The only remaining use of the fmt::format library was for something std::format can't yet handle, printing ranges. This was only used twice, in the same file, so ju
Remove remaining fmt::format use
The only remaining use of the fmt::format library was for something std::format can't yet handle, printing ranges. This was only used twice, in the same file, so just manually build up the vectors in question into a string and use std::format. This was already being done in other places anyway.
Now the fmt::format subproject and dependencies can be completely removed.
An added benefit is that those two fmt::format calls were failing to build on my system when I was trying to build using subprojects, and without them everything works.
Tested: Can still see the traces, though I only have a 1 element vector to test with: Adding fan target lock of 11300 on fans [fan0] zone 0",
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I90055e9d1c8d0b79b151e1cfd0af2052005cef3c
show more ...
|
fbf4703f | 17-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
use std::format instead of fmt::format
The std::format is sufficient for the uses in this repository except for in one file (override_fan_target.cpp, since P2286 isn't supported by GCC yet). Switch
use std::format instead of fmt::format
The std::format is sufficient for the uses in this repository except for in one file (override_fan_target.cpp, since P2286 isn't supported by GCC yet). Switch to std::format whenever possible.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib2576fb530a4d7ce238e1b0bd95b40b476ec2107
show more ...
|
f2040133 | 10-May-2023 |
Matt Spinler <spinler@us.ibm.com> |
control: Trace which fan gets target locked
The override_fan_target action is used to lock a fan to a target in certain cases. It was already tracing when this was occurring, but it didn't say whic
control: Trace which fan gets target locked
The override_fan_target action is used to lock a fan to a target in certain cases. It was already tracing when this was occurring, but it didn't say which fan it was happening to. Add that information.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I074ddcbab32ff5606b7a1c7b3ceb03076a49ce30
show more ...
|
61b73296 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I152f141a5e8343b92b5ce81d3ca16eec77b5606b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
0eeadc23 | 26-Jan-2023 |
Matt Spinler <spinler@us.ibm.com> |
control: Removed unused variable
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I65053bf7a2802eb3c1e5755c975b808978e75056 |
9b06243d | 26-Jan-2023 |
Matt Spinler <spinler@us.ibm.com> |
Add explicit keyword to 1 arg constructors
The cppcheck tool complains about it otherwise.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id977a6c349b0b49354b52ac994ea7742e0a39307 |
e56672d5 | 10-Jan-2023 |
Matt Spinler <spinler@us.ibm.com> |
control: Trace around enabling events
Add flight recorder entries before and after fan control events are enabled on startup. This can be used for debug to tell how long the enables take.
e.g. ```
control: Trace around enabling events
Add flight recorder entries before and after fan control events are enabled on startup. This can be used for debug to tell how long the enables take.
e.g. ``` "Jan 10 16:03:11.329067: main: Enabling events", "Jan 10 16:03:11.385515: zone-floor0: mapped_floor-70(Fan floors) is setting floor hold to 7300", "Jan 10 16:03:11.385534: zone-floor0: Setting new floor to 7300", "Jan 10 16:03:13.951341: main: Done enabling events", ```
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I5753617a38972b28ab12b314576c8774ee73c37e
show more ...
|
1a555607 | 08-Dec-2022 |
Matt Spinler <spinler@us.ibm.com> |
control: mapped_floor: Add conditions
Add the concept of a condition to the mapped_floor action such that it will only run if the condition is met. If the condition isn't met, the run() function wi
control: mapped_floor: Add conditions
Add the concept of a condition to the mapped_floor action such that it will only run if the condition is met. If the condition isn't met, the run() function will just exit immediately.
A condition is created by placing the following in the JSON:
* condition_group - The name of the group that has the property the condition will use. For now, it must be a single member group. * condition_value - The value the property has to be to meet the condition. * condition_op - Either 'equal' or 'not_equal', where the property has to either be equal to or not equal to the condition value.
For example, the following says the single member of the 'cpu 0' group must have its Model property be equal to "1234" for the action to run:
{ "groups": [{ "name": "cpu 0", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset", "property": { "name": "Model" } } ... ], ... "name": "mapped_floor", "key_group": "ambient temp", "condition_group": "cpu 0", "condition_value": "1234", "condition_op": "equal", ... }
If a condition is present but isn't met, the action will remove its floor hold if it has one to support the case of the condition property changing values.
Change-Id: I3ede20efd334e2c5292a441c089534420959c7bc Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
99911bab | 08-Dec-2022 |
Matt Spinler <spinler@us.ibm.com> |
control: Add Zone::hasFloorHold() function
Add this to the Zone class so actions can check if they currently have a floor hold.
Change-Id: I84d0cec7bc3d45feab0ae2c4b08acf6832337f8f Signed-off-by: M
control: Add Zone::hasFloorHold() function
Add this to the Zone class so actions can check if they currently have a floor hold.
Change-Id: I84d0cec7bc3d45feab0ae2c4b08acf6832337f8f Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
cd34ac50 | 08-Dec-2022 |
Matt Spinler <spinler@us.ibm.com> |
control: Catch GetManagedObjects exceptions
The get_managed_objects action makes a GetManagedObjects D-Bus call to put D-bus properties from a service into the cache.
Handle exceptions thrown by it
control: Catch GetManagedObjects exceptions
The get_managed_objects action makes a GetManagedObjects D-Bus call to put D-bus properties from a service into the cache.
Handle exceptions thrown by it in case it was called from a name_owner_changed trigger when the service went off of D-Bus, which would cause it to fail.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I18ebcea327578073780b4658c8a1d897cbfa20e5
show more ...
/openbmc/phosphor-fan-presence/README.md/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,bonnell/events.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,bonnell/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,everest/events.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,everest/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,everest/pcie_cards.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-1s4u/events.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-1s4u/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-1s4u/pcie_cards.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-2u/events.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-2u/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-2u/pcie_cards.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-4u/events.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-4u/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-4u/pcie_cards.json/openbmc/phosphor-fan-presence/control/gen-fan-zone-defs.pyactions/get_managed_objects.cpp/openbmc/phosphor-fan-presence/docs/control/README.md/openbmc/phosphor-fan-presence/docs/control/debug.md/openbmc/phosphor-fan-presence/docs/control/events.md/openbmc/phosphor-fan-presence/docs/control/fanctl/README.md/openbmc/phosphor-fan-presence/docs/control/fans.md/openbmc/phosphor-fan-presence/docs/control/groups.md/openbmc/phosphor-fan-presence/docs/control/zones.md/openbmc/phosphor-fan-presence/docs/monitor/README.md/openbmc/phosphor-fan-presence/docs/monitor/class.md/openbmc/phosphor-fan-presence/docs/monitor/deviation.md/openbmc/phosphor-fan-presence/docs/monitor/fan_missing_error_delay.md/openbmc/phosphor-fan-presence/docs/monitor/group.md/openbmc/phosphor-fan-presence/docs/monitor/inventory.md/openbmc/phosphor-fan-presence/docs/monitor/method.md/openbmc/phosphor-fan-presence/docs/monitor/monitor_start_delay.md/openbmc/phosphor-fan-presence/docs/monitor/nonfunc_rotor_error_delay.md/openbmc/phosphor-fan-presence/docs/monitor/num_nonfunc_rotors_before_error.md/openbmc/phosphor-fan-presence/docs/monitor/num_sensors_nonfunc_for_fan_nonfunc.md/openbmc/phosphor-fan-presence/docs/monitor/power_off_config.md/openbmc/phosphor-fan-presence/docs/monitor/sensors.md/openbmc/phosphor-fan-presence/docs/monitor/set_func_on_present.md/openbmc/phosphor-fan-presence/docs/presence/README.md/openbmc/phosphor-fan-presence/docs/presence/eeprom.md/openbmc/phosphor-fan-presence/docs/presence/methods.md/openbmc/phosphor-fan-presence/docs/presence/name.md/openbmc/phosphor-fan-presence/docs/presence/path.md/openbmc/phosphor-fan-presence/docs/presence/rpolicy.md/openbmc/phosphor-fan-presence/docs/sensor-monitor/README.md/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,bonnell/config.json/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,everest/config.json/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,rainier-1s4u/config.json/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,rainier-2u/config.json/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,rainier-4u/config.json/openbmc/phosphor-fan-presence/monitor/config_files/witherspoon/config.json/openbmc/phosphor-fan-presence/monitor/example/config.json/openbmc/phosphor-fan-presence/monitor/gen-fan-monitor-defs.py/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,bonnell/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,everest/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,rainier-1s4u/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,rainier-2u/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,rainier-4u/config.json/openbmc/phosphor-fan-presence/presence/config_files/witherspoon/config.json/openbmc/phosphor-fan-presence/presence/example/config.json/openbmc/phosphor-fan-presence/presence/example/example.yaml/openbmc/phosphor-fan-presence/presence/pfpgen.py |
b568962b | 15-Nov-2022 |
Chau Ly <chaul@amperecomputing.com> |
control: Modify target_from_group_max algorithm
This patch simplifies the algorithm of target_from_group_max action and only updates fan speed according to the table when the sensor value reaches th
control: Modify target_from_group_max algorithm
This patch simplifies the algorithm of target_from_group_max action and only updates fan speed according to the table when the sensor value reaches the threshold value in the table. Moreover, this will always update the zone's target every action run, no matter whether the group's value has changed or not. This is to support other trigger event (e.g timer-based) and make sure that the zone always run at the desired speed (when group's value has not changed but the zone target has been modified by other actions).
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: If412e5a6e8bcd3080175c49088a07b1b41528ffc
show more ...
/openbmc/phosphor-fan-presence/OWNERS/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,bonnell/events.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,bonnell/fans.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,bonnell/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,bonnell/zones.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,everest/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-1s4u/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-2u/groups.json/openbmc/phosphor-fan-presence/control/config_files/p10bmc/ibm,rainier-4u/groups.jsonactions/target_from_group_max.cpp/openbmc/phosphor-fan-presence/docs/monitor/sensors.md/openbmc/phosphor-fan-presence/docs/presence/README.md/openbmc/phosphor-fan-presence/docs/presence/eeprom.md/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,bonnell/config.json/openbmc/phosphor-fan-presence/monitor/example/monitor.yaml/openbmc/phosphor-fan-presence/monitor/fan.cpp/openbmc/phosphor-fan-presence/monitor/gen-fan-monitor-defs.py/openbmc/phosphor-fan-presence/monitor/json_parser.cpp/openbmc/phosphor-fan-presence/monitor/tach_sensor.cpp/openbmc/phosphor-fan-presence/monitor/tach_sensor.hpp/openbmc/phosphor-fan-presence/monitor/types.hpp/openbmc/phosphor-fan-presence/presence/anyof.cpp/openbmc/phosphor-fan-presence/presence/anyof.hpp/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,bonnell/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,everest/config.json/openbmc/phosphor-fan-presence/presence/eeprom_device.hpp/openbmc/phosphor-fan-presence/presence/fallback.cpp/openbmc/phosphor-fan-presence/presence/fallback.hpp/openbmc/phosphor-fan-presence/presence/json_parser.cpp/openbmc/phosphor-fan-presence/presence/json_parser.hpp/openbmc/phosphor-fan-presence/presence/rpolicy.hpp/openbmc/phosphor-fan-presence/sensor-monitor/threshold_alarm_logger.cpp/openbmc/phosphor-fan-presence/sensor-monitor/threshold_alarm_logger.hpp |
0ee0504f | 20-Sep-2022 |
Chau Ly <chaul@amperecomputing.com> |
control: Modify target_from_group_max increasing case
In the action target_from_group_max, when the sensor's value is increasing, it updates the previous sensor value (_prevGroupValue = groupValue)
control: Modify target_from_group_max increasing case
In the action target_from_group_max, when the sensor's value is increasing, it updates the previous sensor value (_prevGroupValue = groupValue) without checking the hysteresis. This causes the previous sensor value to "tightly" follow the current sensor value. As a result, in case of a large negative hysteresis (_negHysteresis >= 2), the sensor will never be able to pass the hysteresis check which needs a large gap between the previous and the current value.
This patch changes to update _prevGroupValue = groupValue only when it passes the hysteresis check in the increasing case. This also comments out the logging of group processing failure to avoid massive logging (~ every 1s).
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: Ic805ecac60359b6df695864823bc36c027d14805
show more ...
|
44872b07 | 19-Sep-2022 |
Chau Ly <chaul@amperecomputing.com> |
control: Support target_path option in configuration file
The target path containing the interface xyz.openbmc_project.control.FanPwm or xyz.openbmc_project.control.FanSpeed can be different between
control: Support target_path option in configuration file
The target path containing the interface xyz.openbmc_project.control.FanPwm or xyz.openbmc_project.control.FanSpeed can be different between phosphor-hwmon and dbus-sensor.
In phosphor-hwmon, it is "/xyz/openbmc_project/sensors/fan_tach/". In dbus-sensor, it is "/xyz/openbmc_project/control/fanpwm/"
This commit supports making this path configurable via "target_path". By default, it is "/xyz/openbmc_project/sensors/fan_tach/".
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: Id799986ff69455b7c7054070ed2ab3b2e2500a6c
show more ...
|
27f5f4e9 | 01-Sep-2022 |
Matt Spinler <spinler@us.ibm.com> |
control: Remove the sdevent defer redirect on USR1
The signal handler provided by sdeventplus already calls the provided callback function from the event loop, there is no need to use a 'defer' even
control: Remove the sdevent defer redirect on USR1
The signal handler provided by sdeventplus already calls the provided callback function from the event loop, there is no need to use a 'defer' event source that also just calls a function from the event loop.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ie51c6abc9260a8fc43b13844356c62080835ea38
show more ...
|
bb29bb7c | 11-Aug-2022 |
chaul.ampere <chaul@amperecomputing.com> |
control: Json action to set zone's target from group
This commit adds an action to fan control json format, supporting setting target of Zone to a value corresponding to the maximum value from group
control: Json action to set zone's target from group
This commit adds an action to fan control json format, supporting setting target of Zone to a value corresponding to the maximum value from group member properties. The mapping is according to the map. If there are more than one group using this action, the maximum speed derived from the mapping of all groups will be set to target.
For example: { "name": "target_from_group_max", "groups": [ { "name": "zone0_ambient", "interface": "xyz.openbmc_project.Sensor.Value", "property": { "name": "Value" } } ], "neg_hysteresis": 1, "pos_hysteresis": 0, "map": [ { "value": 10.0, "target": 38.0 }, ... ] }
The above JSON will cause the action to read the property specified in the group "zone0_ambient" from all members of the group. The change in the group's members value will be checked against "neg_hysteresis" and "pos_hysteresis" to decide if it is worth taking action. "neg_hysteresis" is for the increasing case and "pos_hysteresis" is for the decreasing case. The maximum property value of the group will be mapped to the "map" to get the output "target". The updated "target" value of each group will be stored in a static map with a key. The maximum value from the static map will be used to set to the Zone's target.
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I7b99a6e82ab2faaf40d290ab6f9cb27781e12952
show more ...
|
2541f99c | 16-Aug-2022 |
Matt Spinler <spinler@us.ibm.com> |
control: Display locked targets in debug dump
The override_fan_target action can lock individual fan targets to a value that is different than the zone target that the rest of the fans are set to.
control: Display locked targets in debug dump
The override_fan_target action can lock individual fan targets to a value that is different than the zone target that the rest of the fans are set to.
This change adds those locked target values to the 'zones' section of the debug dump:
"target_locks": { "fan0": [ 11300 ], "fan3": [ 11300 ] }
And when there are no locks:
"target_locks": {}
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2c4cfa317028db8843d361e79b270d612aacdd87
show more ...
|