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 ...
|
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 ...
|
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 ...
|
3b242b72 | 27-Aug-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Implement i2c_capture_bytes action
Implement the new i2c_capture_bytes action in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnm
regulators: Implement i2c_capture_bytes action
Implement the new i2c_capture_bytes action in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ie43e147a0a076090729871140bb5889c74323d19
show more ...
|
fa23f7d1 | 26-Aug-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Implement log_phase_fault action
Implement the new log_phase_fault action in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnmm@us
regulators: Implement log_phase_fault action
Implement the new log_phase_fault action in the JSON configuration file.
Create gtests to test the new class.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I53130b029967d0a0d7b7fdd9b12f69035b9f085e
show more ...
|
421128ef | 25-Aug-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add phase faults to ActionEnvironment
Enhance the ActionEnvironment class to support detecting and logging redundant phase fault errors.
Add gtests to test the new functions/methods.
S
regulators: Add phase faults to ActionEnvironment
Enhance the ActionEnvironment class to support detecting and logging redundant phase fault errors.
Add gtests to test the new functions/methods.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Id87d811374dd3da616cdeeb780b3575ef96ffbb7
show more ...
|
aacc2aaf | 25-May-2021 |
Matt Spinler <spinler@us.ibm.com> |
regulators: Support a string or vector for VPD
Add a 'byte_values' alternative to the 'value' entry in the compare VPD action. This is to support VPD values that are not strings, such as 'HW', a ne
regulators: Support a string or vector for VPD
Add a 'byte_values' alternative to the 'value' entry in the compare VPD action. This is to support VPD values that are not strings, such as 'HW', a new IBM keyword that describes the version of a piece of hardware.
To support this, the VPD class now treats all VPD keyword values as vectors of uint8_ts, including in its data cache. If a compare VPD action in the JSON contains a string value, it will be converted to the vector before the CompareVPDAction class is created.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I3fcabf896f4885feae1b07ee2c3da5929cf8bfa4
show more ...
|
8c232456 | 05-May-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Complete PMBusReadSensorAction class
Complete implementation of the PMBusReadSensorAction class. Publish the sensor value on D-Bus using the Sensors service.
Update gtests for this cla
regulators: Complete PMBusReadSensorAction class
Complete implementation of the PMBusReadSensorAction class. Publish the sensor value on D-Bus using the Sensors service.
Update gtests for this class to expect calls to the Sensors service. Fix some constructor parameter combinations that did not make sense, such as linear_16 format for non-voltage sensors.
Also refactor the TestSDBusError exception class into a separate file. This allows it to be shared by multiple test cases. This class is a concrete implementation of the abstract sdbusplus::exception_t class used for D-Bus errors.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I5a77616b2ae5b17224c296aeee88019512649589
show more ...
|
2f9e14f6 | 29-Apr-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Convert to new SensorType enumeration
There are several types of voltage regulator sensors, such as vout, iout, and temperature.
The sensor types were previously defined by the enumerat
regulators: Convert to new SensorType enumeration
There are several types of voltage regulator sensors, such as vout, iout, and temperature.
The sensor types were previously defined by the enumeration pmbus_utils::SensorValueType. This enumeration should not have been placed in the pmbus_utils namespace because it is not specific to PMBus.
A new enumeration with the simpler name SensorType was created in sensors.hpp in a previous commit.
Remove the old enumeration from pmbus_utils. Convert affected files to use the new enumeration.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I4136b392b104edd3eee41ec29c779ad084c7c4de
show more ...
|
5135df63 | 28-Apr-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Remove SensorReading data type
Remove the SensorReading data type defined in pmbus_utils.hpp and used in several locations. This data type is no longer needed.
The original design was
regulators: Remove SensorReading data type
Remove the SensorReading data type defined in pmbus_utils.hpp and used in several locations. This data type is no longer needed.
The original design was for sensor readings to be accumulated in the ActionEnvironment while the PMBus actions were being executed. Then all the sensor readings for a voltage rail would be published on D-Bus at the same time.
The current design is for sensor readings to be immediately published on D-Bus as they are read using the new Sensors service. They no longer need to be accumulated in the ActionEnvironment.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ib61a07b5a7f58be3e2dae540ffb4d5128636b7c0
show more ...
|
36fc261b | 16-Mar-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add info to WriteVerificationError
Add more information to the WriteVerificationError exception: * Unique ID of the device where the error occurred * Inventory path of the device where t
regulators: Add info to WriteVerificationError
Add more information to the WriteVerificationError exception: * Unique ID of the device where the error occurred * Inventory path of the device where the error occurred
This information is required in order to create an error log entry based on the exception.
Modify files that currently use WriteVerificationError to adapt to the new constructor and get methods.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I1e7fb321efe86b54dcd32a9752ec7465be90ad48
show more ...
|
5b819f44 | 16-Mar-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add more info to PMBusError
Add more information to the PMBusError exception: * Unique ID of the device where the error occurred * Inventory path of the device where the error occurred
regulators: Add more info to PMBusError
Add more information to the PMBusError exception: * Unique ID of the device where the error occurred * Inventory path of the device where the error occurred
This information is required in order to create an error log entry based on the exception.
Modify files that currently use PMBusError to adapt to the new constructor and get methods.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Iadae82468df3ee46bdd5445f130c43502d454e96
show more ...
|
45907cc7 | 05-Feb-2021 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Complete compare_vpd action
Complete implementation of the compare_vpd action in the JSON configuration file. For more information about this action see https://github.com/openbmc/phosp
regulators: Complete compare_vpd action
Complete implementation of the compare_vpd action in the JSON configuration file. For more information about this action see https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/docs/config_file/compare_vpd.md
Implement the execute() method of the CompareVPDAction class. Obtain the actual VPD keyword value from the VPD service and compare it with the expected value.
Also improve doxygen for the execute() method of the ComparePresenceAction class.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ieb93806245babe6782fef95209bed8eed5b32578
show more ...
|
49e90d3a | 10-Nov-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Implement ComparePresenceAction class
The ComparePresenceAction::execute() method reads the presence value using the Services->getPresenceService()->isPresent() method. Then it compares
regulators: Implement ComparePresenceAction class
The ComparePresenceAction::execute() method reads the presence value using the Services->getPresenceService()->isPresent() method. Then it compares the actual value to the expected value. It returns true if they match and false if they don't.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: Ie6a17191313b2c80a0ecd7a7d7357448985d0673
show more ...
|
73eaceeb | 23-Oct-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Add Services to ActionEnvironment
Add Services& services to the ActionEnvironment constructor. Add Services& getServices() to the ActionEnvironment class. Add Services& services to the A
regulators: Add Services to ActionEnvironment
Add Services& services to the ActionEnvironment constructor. Add Services& getServices() to the ActionEnvironment class. Add Services& services to the ActionEnvironment class. Update the ActionEnvironment test for the new getServices() method. Update classes that create an ActionEnvironment. Update all affected testcases that create an ActionEnvironment.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I12ac9f301746965aa282b69432a71ad525739c9e
show more ...
|
a76898f1 | 13-Oct-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Enhance config file parser
Enhance JSON config file parser to convert relative inventory paths to absolute form.
Tested: Run local CI with -Dlong-tests=enabled to enable tests for valid
regulators: Enhance config file parser
Enhance JSON config file parser to convert relative inventory paths to absolute form.
Tested: Run local CI with -Dlong-tests=enabled to enable tests for validate-regulators-config.py.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I80237a673f9c5918898db15363847722141388e6
show more ...
|
ab7d6cba | 16-Jul-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Fix for GMOCK WARNING
Add the missing EXPECT_CALL to avoid the GMOCK WARNING messages.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I304bb373045543d55e71c90ced17761cacb8cee1 |
717d2da2 | 01-Jun-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Add PMBusReadSensorAction::execute()
Implementation and Testing for PMBusReadSensorAction::execute().
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I350eccfd6daaf95786532975
regulators: Add PMBusReadSensorAction::execute()
Implementation and Testing for PMBusReadSensorAction::execute().
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I350eccfd6daaf957865329756cdfb3be48f49377
show more ...
|
b1ab1cf0 | 18-May-2020 |
Bob King <Bob_King@wistron.com> |
regulators: ActionEnvironment enhancements
Define a new struct named SensorReading. This will be used the store the value read when PMBusReadSensorAction::execute() is called.
Add a new data membe
regulators: ActionEnvironment enhancements
Define a new struct named SensorReading. This will be used the store the value read when PMBusReadSensorAction::execute() is called.
Add a new data member sensorReadings. This will hold the sensor readings that are obtained
Add a new method addSensorReading. It add the specified SensorReading to the sensorReadings vector.
Add a new method getSensorReadings. This will be called by the SensorMonitoring object.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I91076227498712750187d354b76faa2d95e33aac
show more ...
|
d6820bb8 | 28-Apr-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Create regulators PMBusReadSensorAction class
Create the PMBusReadSensorAction class that implements the "pmbus_read_sensor" action in the JSON config file.
Only create the .hpp file fo
regulators: Create regulators PMBusReadSensorAction class
Create the PMBusReadSensorAction class that implements the "pmbus_read_sensor" action in the JSON config file.
Only create the .hpp file for PMBusReadSensorAction class first.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I689ad9dbefe601d8962c694e7e1b8b7275ba6880
show more ...
|
8e4cb645 | 24-Apr-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Create regulators CompareVPDAction class
Create the CompareVPDAction class that implements the "compare_vpd" action in the JSON config file.
Only create the .hpp file for CompareVPDActi
regulators: Create regulators CompareVPDAction class
Create the CompareVPDAction class that implements the "compare_vpd" action in the JSON config file.
Only create the .hpp file for CompareVPDAction class first.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I49663e1f9a2a28996b397cca47eb2c47847592bf
show more ...
|
07301eac | 21-Apr-2020 |
Bob King <Bob_King@wistron.com> |
regulators: Create regulators ComparePresenceAction class
Create the ComparePresenceAction class that implements the "compare_presence" action in the JSON config file.
Only create the .hpp file for
regulators: Create regulators ComparePresenceAction class
Create the ComparePresenceAction class that implements the "compare_presence" action in the JSON config file.
Only create the .hpp file for ComparePresenceAction class first.
Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: If2cbe5e363ae92618604887f5c534dfa10ab216f
show more ...
|
0fd07d7d | 06-Mar-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Use std::optional in ActionEnvironment
Use the std::optional data type in the ActionEnvironment class to represent an optional volts value setting.
Signed-off-by: Shawn McCarney <shawnm
regulators: Use std::optional in ActionEnvironment
Use the std::optional data type in the ActionEnvironment class to represent an optional volts value setting.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ib66f7586a49d78d8e0241fb8e7e4ecd881d1ac01
show more ...
|
a8119f26 | 02-Mar-2020 |
Shawn McCarney <shawnmm@us.ibm.com> |
regulators: Add pmbus_write_vout_command action
Implement the pmbus_write_vout_command action in the JSON config file. See pmbus_write_vout_command.md for more information about this action.
Signed
regulators: Add pmbus_write_vout_command action
Implement the pmbus_write_vout_command action in the JSON config file. See pmbus_write_vout_command.md for more information about this action.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Idef8da56d19df8a416efec068ffa9fb9493100cc
show more ...
|