f5402197 | 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: I7b90380845efee6bf6a1fe342a793d71aa9ff181 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
5f51444d | 04-Jan-2024 |
Shawn McCarney <shawnmm@us.ibm.com> |
Move TemporaryFile class to root directory
Source code that is shared across applications is located in the root directory of the phosphor-power repository.
The TemporaryFile class was originally c
Move TemporaryFile class to root directory
Source code that is shared across applications is located in the root directory of the phosphor-power repository.
The TemporaryFile class was originally created for the phosphor-regulators application. However it is general purpose and is now needed by the phosphor-power-sequencer application.
Move the TemporaryFile class to the root directory. Update C++ files that use the TemporaryFile class since it is now in a different namespace. Update affected meson.build files.
Change-Id: I6d18080d2436a5da87b7ab51ac003c503caa36a3 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
show more ...
|
5c6a693e | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I37fcb391dcb215a86a60c26f7512f6ccb8312dc4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
888bebde | 31-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: add necessary subprojects
Add subprojects for all the direct dependencies of the project such that the project can be built outside of a Yocto SDK on a typical Linux development system.
-
meson: add necessary subprojects
Add subprojects for all the direct dependencies of the project such that the project can be built outside of a Yocto SDK on a typical Linux development system.
- Update the .gitignore to ignore the subproject source directories. - Update the .gitignore to ignore alternative build subdirectory names as is typical with most projects in the openbmc organization. - Add wrap files for direct dependencies, copied from other repositories that already have the same dependencies. - Modify the meson.build dependency for libgpiod so that the C++ bindings are included. - Add many missing dependencies throughout. - Sort all dependencies alphabetically for consistency.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0feb6f0f175e6dba0b00a2c2b666eb0801575734
show more ...
|
81e554c8 | 31-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
tests: adjust self-copy tests
There are a couple tests which attempt to copy an object onto itself via a `std::move`. GCC 13 catches this as a "move onto self" and flags it as an error. Rather tha
tests: adjust self-copy tests
There are a couple tests which attempt to copy an object onto itself via a `std::move`. GCC 13 catches this as a "move onto self" and flags it as an error. Rather than use the `std::move`, perform a static_cast into an r-value reference so that the same copy-constructor is called as if the std::move were successfully used.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I097889578492b1a3ab456e8cb21a668aa0855be4
show more ...
|
41a6b9f3 | 31-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
remove unnecessary std::move calls
GCC 13 now flags a std::move of an returned temporary as unnecessary and likely preventing RVO. Remove the unnecessary std::move.
Signed-off-by: Patrick Williams
remove unnecessary std::move calls
GCC 13 now flags a std::move of an returned temporary as unnecessary and likely preventing RVO. Remove the unnecessary std::move.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibde052b5a4efd84bdbbac2f2f6e673729b32e6cd
show more ...
|
48781aef | 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: If66f68c96df4baf8dc07abf8729a3cb7657e932d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
944ff61c | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
beautysh: re-format
beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh files to have a consistent formatting. Re-run the formatter on the whole repository.
Change-Id: If2be5279a
beautysh: re-format
beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh files to have a consistent formatting. Re-run the formatter on the whole repository.
Change-Id: If2be5279a84f72f4b8d58a978305b7c650d4f5be Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
0a2b76bc | 06-Dec-2022 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Update test cases for new jsonschema
The validate-regulators-config.py tool validates regulator configuration files. It uses the jsonschema Python package to perform much of the validat
regulators: Update test cases for new jsonschema
The validate-regulators-config.py tool validates regulator configuration files. It uses the jsonschema Python package to perform much of the validation.
The automated test cases for this tool run the tool against various invalid configuration files and verify the resulting error messages.
The latest version of jsonschema changed the error messages that are emitted in some error cases. Update the test cases to expect the new error messages.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I369f32705c64c19d521c4624188ebbc98522cff2
show more ...
|
7354ce62 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ief05bd757cffb1453e058a719ee4b060861752e7
show more ...
|
fa2734d6 | 30-Mar-2022 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Retry failed sensor monitoring
If a failure occurs while trying to read voltage regulator sensors, retry the operation 5 times before logging an error.
This provides "de-glitching" to i
regulators: Retry failed sensor monitoring
If a failure occurs while trying to read voltage regulator sensors, retry the operation 5 times before logging an error.
This provides "de-glitching" to ignore transient hardware problems.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I310c15eb0f0d36d938057d6280a12b5aef854d20
show more ...
|
b3ba516f | 30-Nov-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Enhance additional error data capture
Enhance the additional error data capture support to allow the same register to be captured multiple times.
The additional error data is stored as
regulators: Enhance additional error data capture
Enhance the additional error data capture support to allow the same register to be captured multiple times.
The additional error data is stored as key/value pairs. The key format is normally:
<deviceID>_register_<register>
For example, "vdd1_register_0x7A".
If the same register is captured multiple times, a counter is appended to make the key unique. For example, "vdd1_register_0x7A_2".
One use case for capturing the same register multiple times is when a voltage regulator produces multiple rails. It may be necessary to do the following: * Set the PMBus PAGE to 0 * Capture a register for the first rail * Set the PMBus PAGE to 1 * Capture the same register again for the second rail
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I55c3e071b4b60e103f1de5778ede58b032ea29da
show more ...
|
a2a830b1 | 30-Oct-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Allow empty expected VPD value
Modify the compare_vpd action to support specifying an empty string or empty byte vector as the expected keyword value.
The VPD service was modified in a
regulators: Allow empty expected VPD value
Modify the compare_vpd action to support specifying an empty string or empty byte vector as the expected keyword value.
The VPD service was modified in a previous commit to return an empty keyword value if the VPD interface or keyword does not exist on the specified D-Bus object path. Thus, the actual keyword value may be empty.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: If48ab6423c40e5b24d6cff72264dc2efe750c85f
show more ...
|
4c88a4c2 | 21-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Make inventory_path required property
Make "inventory_path" a required property of the "chassis" object in the regulators JSON configuration file.
This property is used to create the ch
regulators: Make inventory_path required property
Make "inventory_path" a required property of the "chassis" object in the regulators JSON configuration file.
This property is used to create the chassis <-> sensor associations required by bmcweb for finding regulator sensors.
The property is already documented in the markdown file as being required. However, that requirement was not being enforced in the JSON schema nor in the C++ configuration file parser.
The existing configuration files did not have the property, and requiring it would have caused errors.
Those configuration files have been updated to include the property, so the requirement is now being enforced.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: If9af7969f8b92068e66c750681179db70eae489e
show more ...
|
37af670e | 10-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add detectPhaseFaults() to System
Add a detectPhaseFaults() method to the System class. This method detects redundant phase faults in all regulator devices in the system.
Add a gtest t
regulators: Add detectPhaseFaults() to System
Add a detectPhaseFaults() method to the System class. This method detects redundant phase faults in all regulator devices in the system.
Add a gtest test case to exercise the new code.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I61b897b6b563280a2c0440aa2f35f3eb6c5de232
show more ...
|
a3fecef3 | 09-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Simplify System test cases
Simplify the gtest test cases for the System class by using auto when creating objects with std::make_unique(). This eliminates some redundant type declaratio
regulators: Simplify System test cases
Simplify the gtest test cases for the System class by using auto when creating objects with std::make_unique(). This eliminates some redundant type declarations.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I5ffcfd8bda62950b393c2ba3d6a56e84e4f6be38
show more ...
|
50e57c6b | 09-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add detectPhaseFaults() to Chassis
Add a detectPhaseFaults() method to the Chassis class. This method detects redundant phase faults in all regulator devices in the chassis.
Add a gtes
regulators: Add detectPhaseFaults() to Chassis
Add a detectPhaseFaults() method to the Chassis class. This method detects redundant phase faults in all regulator devices in the chassis.
Add a gtest test case to exercise the new code.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ie4efce27e4c96c2f77831434c94e07dcd5c3d7db
show more ...
|
83058606 | 09-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Simplify Chassis test cases
Simplify the gtest test cases for the Chassis class by making the following enhancements: * Convert the test suite to a test fixture class. Automatically cre
regulators: Simplify Chassis test cases
Simplify the gtest test cases for the Chassis class by making the following enhancements: * Convert the test suite to a test fixture class. Automatically create the parent System object in the class constructor. * Use auto when creating objects using std::make_unique() to eliminate redundant type declarations.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I8ff635507d4e25a26705d85a0994b26edd903da5
show more ...
|
2ee4494c | 09-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Clear phase fault history in Device
Enhance the clearErrorHistory() method of the Device class to clear phase fault error history.
Update the gtest test case to exercise the modified co
regulators: Clear phase fault history in Device
Enhance the clearErrorHistory() method of the Device class to clear phase fault error history.
Update the gtest test case to exercise the modified code.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I109932c0f4812bb36af05ac24e47a561270b4fcc
show more ...
|
0c9a33d6 | 13-Sep-2021 |
Adriana Kobylak <anoo@us.ibm.com> |
clang updates
The openbmc CI was recently updated to clang-12 which requires some formatting updates to the code: https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be048242690
clang updates
The openbmc CI was recently updated to clang-12 which requires some formatting updates to the code: https://github.com/openbmc/openbmc-build-scripts/commit/4569bf49daaebff06be0482426908bb5497fad08
Make those updates and refresh the clang-format file with the one from docs: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
Change-Id: Ieb3626526373a053ec84431e7560003f229f338d Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
1fd0b145 | 09-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add detectPhaseFaults() to Device
Add a detectPhaseFaults() method to the Device class. This method executes the PhaseFaultDetection data member added in a previous commit.
Add a gtest
regulators: Add detectPhaseFaults() to Device
Add a detectPhaseFaults() method to the Device class. This method executes the PhaseFaultDetection data member added in a previous commit.
Add a gtest test case to exercise the new code.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ie8a2bf7d1b60ebc29c256e8563e3e4808bb6a20e
show more ...
|
2874e902 | 09-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Simplify Device test cases
Simplify the gtest test cases for the Device class by making the following enhancements: * Convert the test suite to a test fixture class. Automatically creat
regulators: Simplify Device test cases
Simplify the gtest test cases for the Device class by making the following enhancements: * Convert the test suite to a test fixture class. Automatically create the parent Chassis and System objects in the class constructor. * Use auto when creating objects using std::make_unique() to eliminate redundant type declarations. * Define a constant for the Device inventory path.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I86702a33c7ea7e1595ec251935e648c1c228d02b
show more ...
|
32252599 | 08-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add PhaseFaultDetection to Device
Add a PhaseFaultDetection data member to the Device class. This is the first step in enabling phase fault detection for Device objects.
Create and mod
regulators: Add PhaseFaultDetection to Device
Add a PhaseFaultDetection data member to the Device class. This is the first step in enabling phase fault detection for Device objects.
Create and modify gtest test cases to exercise new code.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Icc771eda5c79ace854acb1d7c395b82b34213996
show more ...
|
38f802ac | 08-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: add errno
sdbusplus is going to start requiring the 'get_errno' function on all exceptions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If98b71c227b109341189409ea8de42
exception: add errno
sdbusplus is going to start requiring the 'get_errno' function on all exceptions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If98b71c227b109341189409ea8de42fa333e99c0
show more ...
|
39eb08a9 | 07-Sep-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add phase_fault_detection to parser
Enhance the JSON configuration file parser to support the new phase_fault_detection object.
Add gtest test cases to exercise new code.
Signed-off-by
regulators: Add phase_fault_detection to parser
Enhance the JSON configuration file parser to support the new phase_fault_detection object.
Add gtest test cases to exercise new code.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I5b987054ef35c8b27d7d984e5e9ec9b4488bf944
show more ...
|