940083bd | 08-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Fix override errors
The following errors were reported during the clang-tidy enablement build due to overridden functions not being marked with the override keyword. The proposed fix is
clang-tidy: Fix override errors
The following errors were reported during the clang-tidy enablement build due to overridden functions not being marked with the override keyword. The proposed fix is to add the override keyword where it was missing.
''' inc/serial_uart_mux.hpp:74:10: error: 'handleEvent' overrides a member function but is not marked 'override' [-Werror '''
Tested: Verified Build and unit testing.
Change-Id: I999968f538650fb4eefd1702fffcbe49d97d5747 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
31ce375e | 08-Nov-2024 |
Rush Chen <rush.chen.wiwynn@gmail.com> |
Support multi power buttons with multi behaviors
For supporting more-than-one power buttons behaviors, add new matches and instances by following json config.
This change is for multiple slots inte
Support multi power buttons with multi behaviors
For supporting more-than-one power buttons behaviors, add new matches and instances by following json config.
This change is for multiple slots integrated on one chassis, and each slot has button to control power status.
For example: /xyz/openbmc_project/Chassis/Buttons/Power01 for button on slot1 /xyz/openbmc_project/Chassis/Buttons/Power02 for button on slot2
Moreover, support multi-level power control by json config, chassis now can do action by corresponding pressing duration.
Tested: Press buttons and check corresponding behaviors.
Change-Id: I7789f0367d5e846dd9e68f966ba0755fc916217a Signed-off-by: Rush Chen <rush.chen.wiwynn@gmail.com>
show more ...
|
4c47d4c9 | 28-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
README: fix JSON definition
A JSON blob wasn't formatting properly because it was invalid JSON. Repair the JSON and reformat.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I048a221
README: fix JSON definition
A JSON blob wasn't formatting properly because it was invalid JSON. Repair the JSON and reformat.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I048a221ed6e802e39aaf2a7d4d0d93eb97674ca5
show more ...
|
d36b6b1d | 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: Ic25904c3a6dc2d09cc28cabff14e4ba4c8dc8397 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
010035ee | 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I7ddcf61ed2d596171384fdb5f0fc1e2feb4240bf Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
971312ab | 12-Apr-2024 |
Patrick Williams <patrick@stwcx.xyz> |
button: convert long-press time to std::chrono
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia97dc229b43e32a30e4e57881628ab408896dcfb |
3e30b7a6 | 12-Apr-2024 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
meson: simplify config data
Simplify the meson.build configuration data by removing a number of entries, which never need to be configured, and move as static fields in a config.hpp template.
Chang
meson: simplify config data
Simplify the meson.build configuration data by removing a number of entries, which never need to be configured, and move as static fields in a config.hpp template.
Change-Id: Idd9383c9c38eceb066a5d1e25a086db175aa06bf Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
15c60e2f | 12-Apr-2024 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
meson: switch config.h to config.hpp
Enable a transition of this file from C to C++ so that we can use C++ constants instead of #defines in future commits.
Change-Id: I1149ebdaaeb99b7e7974ca846b9b0
meson: switch config.h to config.hpp
Enable a transition of this file from C to C++ so that we can use C++ constants instead of #defines in future commits.
Change-Id: I1149ebdaaeb99b7e7974ca846b9b07a3399edea0 Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
3610608c | 26-Feb-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: use direct enum conversion
lg2 now has the ability to directly convert enums for which there is not any other conversion. Leverage that to simplify the code.
Signed-off-by: Patrick Williams <
lg2: use direct enum conversion
lg2 now has the ability to directly convert enums for which there is not any other conversion. Leverage that to simplify the code.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I22004dacf7171882d8219aa3dd09d87044da4db6
show more ...
|
cb418b0d | 16-Jan-2024 |
Jonico Eustaquio <jonico.eustaquio@fii-na.com> |
Adding num key parsing
Currently there is only support for an alphanumeric references that is decoded into a pin number. The "num" keyword supports using the pin number directly (integer). The JSON
Adding num key parsing
Currently there is only support for an alphanumeric references that is decoded into a pin number. The "num" keyword supports using the pin number directly (integer). The JSON key field determines the parsing.
It matches the support for the "num" keyword for the gpio_defs.json seen in skeleton/libobmc_intf. If added along with:
https://gerrit.openbmc.org/c/openbmc/skeleton/+/68883
then "num" could be used for systems that have numerically labeled GPIO pins and have multiple GPIO banks.
Change-Id: Ibf3e432a36c60b650c7f245ee12e5af3a8359664 Signed-off-by: Jonico Eustaquio <jonico.eustaquio@fii-na.com>
show more ...
|
9c276560 | 19-Jan-2024 |
Patrick Williams <patrick@stwcx.xyz> |
State.Chassis: update service name
Both phosphor-state-manager and x86-power-control have code that exposes both the Chassis and Chassis0 bus names as a backwards compatibility when multi-chassis su
State.Chassis: update service name
Both phosphor-state-manager and x86-power-control have code that exposes both the Chassis and Chassis0 bus names as a backwards compatibility when multi-chassis support was added. Switch to the numbered bus name, which is expected to be the non-deprecated one.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic20cddf51ced0a47fa8b754ec6bda6be5781412e
show more ...
|
88f20387 | 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: Ida574b0056c8883398ecf8efeb37316a1d120617 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
7824da46 | 07-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: adjust nlohmann-json dependency
Simplify nlohmann-json dependency logic and align wrap file name with other repositories.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I70f4
meson: adjust nlohmann-json dependency
Simplify nlohmann-json dependency logic and align wrap file name with other repositories.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I70f42525bb61e7b353288e826cc7e89e1b03002f
show more ...
|
61538147 | 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: I1334428cf2d160f6be39f35edfe8da40b6626555 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
0d6d74c8 | 17-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
serial-uart-mux: use non-deprecated sdbusplus-client names
The generated sdbus++ bindings have SDBUSPP_REMOVE_DEPRECATED_NAMESPACE as a guard around the type that was previously used. Use the non-d
serial-uart-mux: use non-deprecated sdbusplus-client names
The generated sdbus++ bindings have SDBUSPP_REMOVE_DEPRECATED_NAMESPACE as a guard around the type that was previously used. Use the non-deprecated name to future-proof this code.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I47ed9660284c67c618224d034120063dfb86c6d0
show more ...
|
70a0dc8b | 16-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson: Replace configure_file with fs.copyfile
configure_file is deprecated since 0.64.0, and replace it with fs.copyfile.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I6e1434ac7cc3d5
meson: Replace configure_file with fs.copyfile
configure_file is deprecated since 0.64.0, and replace it with fs.copyfile.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I6e1434ac7cc3d5abdac38f737b35e0889315fe95
show more ...
|
30a52067 | 15-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using t
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using the .txt extension for a build file has a few advantages, chief among them many tools and text editors expect a file with the .txt extension to be plain text files, not build scripts.
[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ie3d168e037fafa8b6829aba2bc18fe2b2d4d6443
show more ...
|
9456ffc9 | 22-Jun-2023 |
HuyLe <hule@amperecomputing.com> |
Add warm-reboot option support for reset button
Pressing reset button currently issues a reboot transion. However, some platforms might expect to have force warm reboot instead. This commit adds new
Add warm-reboot option support for reset button
Pressing reset button currently issues a reboot transion. However, some platforms might expect to have force warm reboot instead. This commit adds new reset-button-do-warm-reboot option to configure the expected action for reset button on those platforms.
Tested: - By default, on release of reset button, the Host is powered cycle. - Enable reset-button-do-warm-reboot meson option. On release of reset button, the Host is reset while Host power does not change.
Change-Id: I5d5f754f8b848fa0faef97354ef0dab7c47645f4 Signed-off-by: HuyLe <hule@amperecomputing.com>
show more ...
|
10bc3aeb | 12-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Icbe9e0c5323cfebe18e41
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Icbe9e0c5323cfebe18e41922a06908b1ed9d1728 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
b748fdb5 | 04-Apr-2023 |
Matt Spinler <spinler@us.ibm.com> |
Describe button behavior in the README
Explain what the various button presses do.
Change-Id: I0811e4cd08da0ae9849688d095107950a4d9f1b8 Signed-off-by: Matt Spinler <spinler@us.ibm.com> |
1a309f77 | 04-Apr-2023 |
Matt Spinler <spinler@us.ibm.com> |
Create a custom power button handler
IBM has specific requirements on how the power button must behave, which are different than what the button handler currently does.
These requirements are: If
Create a custom power button handler
IBM has specific requirements on how the power button must behave, which are different than what the button handler currently does.
These requirements are: If power is off: - A button press will power on as long as the BMC is in the ready state.
If power is on: - A button press less than 4s won't do anything. - At 4s, issue a host power off and start a 10s timer. - If the button is released within that 10s and not pressed again, continue with the host power off. - If the button is released within that 10s and also pressed again in that 10s, do a hard power (chassis) off. - If the button is pressed throughout that 10s issue a hard power off.
Instead of trying to integrate this behavior into the main button handler code using even more #ifdefs in various spots, this commit creates the concept of custom power button handlers, and then implements one. This makes it less likely it could subtly break when changes are made to the default code.
A 'power-button-handler' meson option is used to select the handler, where the default uses the current behavior. A PowerButtonHandlerFactory then creates the appropriate instance of the handler selected by that option. If a handler is found, then the default matches/callbacks won't be done and the handler can deal with them as it sees fit.
Handlers are derived from a PowerButtonHandler abstract base class that has 2 pure virtual functions: - void pressed(); - void released(uint64_t pressTimeMS);
It will register for the power button pressed/released signals and then call these overridden functions appropriately.
This new handler is implemented in a HostThenChassisPowerOff class.
Change-Id: I3a1df688c4393b4643d42e91c075379f9a266eef Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
9479b06c | 04-Apr-2023 |
Matt Spinler <spinler@us.ibm.com> |
button-handler: use sdeventplus loop
Use the sdeventplus event loop so that an upcoming commit can make use of sdeventplus timers.
Change-Id: I596ee36141f16ceb5e95078bad9fbe6a12c832a6 Signed-off-by
button-handler: use sdeventplus loop
Use the sdeventplus event loop so that an upcoming commit can make use of sdeventplus timers.
Change-Id: I596ee36141f16ceb5e95078bad9fbe6a12c832a6 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
ccd7db05 | 09-Feb-2023 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
Support host selector using cpld definitions
Description: - Support host selector using cpld definitions
Design: - Because the current structure only supports config defined by GPIO (Yosemite V2)
Support host selector using cpld definitions
Description: - Support host selector using cpld definitions
Design: - Because the current structure only supports config defined by GPIO (Yosemite V2), but there are also have the system (Yosemite V3.5) gets the host-selector's selection from CPLD.
- So this commit is to extend the current configuration to use CPLD definitions. Also, support adding event io from the register file which was exported from the CLD driver.
- For example with config json below: { "cpld_definitions": [ { "name": "HOST_SELECTOR", "i2c_address": 15, "i2c_bus": 12, "register_name": "uart-selection-debug-card", "max_position": 4 } ] }
Dependency: - CLD driver is required (link: https://lore.kernel.org/lkml/20230117094425.19004-1-Delphine_CC_Chiu@Wiwynn.com/)
Test Case: - When ocp debug card uart button is pressed the position property on dbus is correct.
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Change-Id: I6746afa6d905bd3c681e2921c643b3cd4cb9944c
show more ...
|
0d038f58 | 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: Iad285e60cad29e025a02d0c0cabcb76fe593b5cf Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
395c764c | 18-Apr-2023 |
DelphineCCChiu <Delphine_CC_Chiu@wiwynn.com> |
Remove power button long-press
So far, counting power button's pressing duration is supported. There's no need to handle redundant case for button long-press.
Tested: Press buttons and check corres
Remove power button long-press
So far, counting power button's pressing duration is supported. There's no need to handle redundant case for button long-press.
Tested: Press buttons and check corresponding behaviors.
Change-Id: I96d9160a10de6d4572148c55e2b7c2a9221d42e2 Signed-off-by: DelphineCCChiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|