#
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 ...
|
#
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 ...
|
#
bc4179e9 |
| 04-Oct-2022 |
Matt Spinler <spinler@us.ibm.com> |
pres: Add way to bind fan eeprom driver after plug
Some fans have EEPROMs on them that are read by other BMC code so the contents can be added to the BMC inventory. Since fans can usually be hotplu
pres: Add way to bind fan eeprom driver after plug
Some fans have EEPROMs on them that are read by other BMC code so the contents can be added to the BMC inventory. Since fans can usually be hotplugged, this means those EEPROMs need to be read after a fan is plugged, and there was previously no method to trigger that.
This commit adds functionality to phosphor-fan-presence-tach to bind the EEPROM driver to the new device after a fan with an EEPROM is plugged. This triggers a udev event which triggers EEPROM reads if the platform is configured to do so.
This is done with a new optional JSON section in the config.json, which looks like: "eeprom": { "bus_address": "31-0050", "driver_name": "at24", "bind_delay_ms": 1000 }
The 'bus_address' field is the device's I2C bus and address string as it is represented in the I2C subsystem in sysfs. The 'driver_name' field is the name of the device driver that manages that device. The 'bind_delay_ms' field allows there to be a defined amount of time between when the device is plugged and when the driver is bound, in case a certain amount of time is required for the device to come online after it receives power.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I10d36efab954393239e6face96244ecd34035596
show more ...
|
#
808d7fe8 |
| 13-Jun-2022 |
Mike Capps <mikepcapps@gmail.com> |
meson support: remove code warnings 1
This commit contains code changes necessary to support the increased warning level from Meson builds. Most changes are for unused variables.
To keep the review
meson support: remove code warnings 1
This commit contains code changes necessary to support the increased warning level from Meson builds. Most changes are for unused variables.
To keep the review size manageable, this commit contains only monitor and presence changes (and top-level json_config.hpp).
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Change-Id: I7280b512c54e8d5aeba3300764a239f3dcbab14d
show more ...
|
#
ae226194 |
| 15-Oct-2020 |
Jay Meyer <jaymeyer@us.ibm.com> |
Enhance fan tracing support - add device access info
Move file names for file errors to the journal message. Enhance usablility.
Logging messages for file errors contain the file names and other in
Enhance fan tracing support - add device access info
Move file names for file errors to the journal message. Enhance usablility.
Logging messages for file errors contain the file names and other information inside structured entries rather than directly in the log message. This makes viewing errors more difficult than need be. Before this change, the journal report needed to be run with '-o verbose' to see the file names.
Tested: - For cooling-type/cooling_type.cpp Approx line 39: A dry-dock test of this message was performed by commenting out the return for the successful case just above and adding a successful return just below the journal message. Then the next test can output this log message: Failed to get libevdev from file descriptor 4, return code 0
Approx line 71: Do this to get error below: "phosphor-cooling-type --air --dev=/dev/input/by-path/platform-gpio-keys-polled-event --path=/system/chassis/motherboard/ --event=21" Message: "Device does not support event type keycode 21"
- For cooling-type/main.cpp Approx line 73: Do this to provoke error below: "phosphor-cooling-type --air --dev=/dev/input/by-path/platform-gpio-keys-polled-event --path=/system/chassis/motherboard/ --event=6" Message: "Uncaught DBus method failure exception Busname: xyz.openbmc_project.Inventory.Manager Path: /xyz/openbmc_project/inventory Interface xyz.openbmc_project.Inventory.Manager Method: Notify"
- For presence/fallback.cpp Approx line 56: Run fan presence application using a 'fallback' rpolicy for a fan and set that fan's gpio presence line to false within simulation.
Journal Message: Using backup presence sensor for fan /system/chassis/motherboard/fan0
For presence/fallback.cpp Approx line 82: Set a fan's gpio presence line to false within simulation and then run the fan presence application using a 'fallback' rpolicy for that fan.
Journal Message: Using backup presence sensor for fan /system/chassis/motherboard/fan0
- For presence/tach.cpp Approx line 76: Remove a fan sensor from the fan controller hwmon config that is configured within the fan presence application. Then unbind and rebind the fan controller device driver and start the fan presence application.
Journal Message: Unable to read fan tach sensor /xyz/openbmc_project/sensors/fan_tach/fan3_0
- For utility.hpp: Approx line 65: Do this to get error below: "phosphor-cooling-type --air --dev=/dev/input/by-path/platform-gpio-keys-polled- --path=/system/chassis/motherboard/ --event=21" Message: "Failed to open file device path /dev/input/by-path/platform-gpio-keys-polled-"
Signed-off-by: Jay Meyer <jaymeyer@us.ibm.com> Change-Id: I592481d92b18b85e5ea5b7040389467530b581e1
show more ...
|
#
2d2caa34 |
| 26-May-2020 |
Matthew Barth <msbarth@us.ibm.com> |
presence: Clang format updates
Used `format-code.sh` build script to make changes to conform to clang format.
Tested: Compiled
Change-Id: I2fc795938e85a752ee56b54212d389c2ff296828 Signed-off-by: M
presence: Clang format updates
Used `format-code.sh` build script to make changes to conform to clang format.
Tested: Compiled
Change-Id: I2fc795938e85a752ee56b54212d389c2ff296828 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
b0de1d6a |
| 10-May-2018 |
Joseph Reynolds <jrey@us.ibm.com> |
Use s.c_str() in log messages
Partly resolves openbmc/openbmc 2905
Tested: static_assert only
Change-Id: I0cabc8d84c763af924d067880417c9a11bcfde58 Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
|
#
11083eca |
| 25-Jul-2017 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
presence: Add sensor to redundancy policy api
Include a reference to the sensor changing state when sensor implementations ping the policy object.
This allows policy logic based on multiple sensors
presence: Add sensor to redundancy policy api
Include a reference to the sensor changing state when sensor implementations ping the policy object.
This allows policy logic based on multiple sensors, simultaneously.
Change-Id: I44cf00c7ecd220d0cc99e51ca6093bac6da7343c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
#
bfb81607 |
| 14-Jun-2017 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
presence: Add fallback redundancy policy
Add a fallback redundancy implementation of the RedundancyPolicy interface.
The fallback policy associates multiple PresenceSensor instances to a single fan
presence: Add fallback redundancy policy
Add a fallback redundancy implementation of the RedundancyPolicy interface.
The fallback policy associates multiple PresenceSensor instances to a single fan, and "falls-back" on secondary sensor implementations when the primary sensor cannot see the fan.
Change-Id: I6468d77d97b8916b3ff33bcd0cd28a102d1aaba1 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|