#
64b5ac20 |
| 04-Apr-2025 |
Anwaar Hadi <anwaar.hadi@ibm.com> |
Move the control application to lg2
Update the logging API used for files in phosphor-fan-presence/control from the older phosphor::logging::log to the more recent lg2::log.
Tested: * Verified jour
Move the control application to lg2
Update the logging API used for files in phosphor-fan-presence/control from the older phosphor::logging::log to the more recent lg2::log.
Tested: * Verified journal traces worked correctly in simulation. * Modified json to force various property errors and verified correct key/value pairs in the journalctl output.
Change-Id: If1ac33b90abe2a9baae6f3cc788863bd514fa80e Signed-off-by: Anwaar Hadi <anwaar.hadi@ibm.com>
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|