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 ...
|
149452b0 | 12-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
power-button: fix released signal to include duration
The latest dbus interface requires a duration in microseconds for the PowerButton.Released signal. Add it in now so that the code successfully
power-button: fix released signal to include duration
The latest dbus interface requires a duration in microseconds for the PowerButton.Released signal. Add it in now so that the code successfully compiles.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib82db55b9c7e50cc018f5e3a5b1f0c71b9d4c7c7
show more ...
|
06b10603 | 12-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig` keyword argument. Ensure meson 0.58 is required and update the usage of all `get_pkgconfig_variable` and `get_variable` to be the modern variant.
Change-Id: I936bcd6cb3e541883e3893811494d860f6430c9e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
4fcfadd3 | 14-Feb-2023 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
treewide: remove dependencies on mapper.target
The mapper is dbus activated now, so these explicit dependency declarations are unnecessary and redundant.
Change-Id: I2d4c0eb4e4bd88f3a13929b4fd9fd43
treewide: remove dependencies on mapper.target
The mapper is dbus activated now, so these explicit dependency declarations are unnecessary and redundant.
Change-Id: I2d4c0eb4e4bd88f3a13929b4fd9fd435250be156 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
ce24bf63 | 09-Dec-2022 |
kuiying <wangkuiying.wky@alibaba-inc.com> |
Updagte Kuiying's email address
Kuiying's email address is changed to wangkuiying.wky@alibaba-inc.com
Signed-off-by: kuiying <wangkuiying.wky@alibaba-inc.com> Change-Id: I9cfaee0dcabc5d624f2f325275
Updagte Kuiying's email address
Kuiying's email address is changed to wangkuiying.wky@alibaba-inc.com
Signed-off-by: kuiying <wangkuiying.wky@alibaba-inc.com> Change-Id: I9cfaee0dcabc5d624f2f325275d0774ef245bfb1
show more ...
|
c0fee46e | 23-Dec-2022 |
Potin Lai <potin.lai@quantatw.com> |
button_handler: use CurrentHostState for powered on checking
Current poweredOn() function is based on chassis CurrentPowerState, so it does not turn on the host when chassis is powered on and host s
button_handler: use CurrentHostState for powered on checking
Current poweredOn() function is based on chassis CurrentPowerState, so it does not turn on the host when chassis is powered on and host state is off. Switch to use CurrentHostState property for system powered on checking.
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: Ife184a718944f6f318fad4494d077251c250b7c8
show more ...
|
e2d0f426 | 19-Dec-2022 |
Potin Lai <potin.lai@quantatw.com> |
button_handler: fix invalid power event error
Current power button handler handles longPowerReleased event, which should be longPowerPressed. revert back to longPowerPressed to avoid error of invali
button_handler: fix invalid power event error
Current power button handler handles longPowerReleased event, which should be longPowerPressed. revert back to longPowerPressed to avoid error of invalid power event.
Tested on Bletchley:
- Before ``` root@bletchley:~# journalctl -u phosphor-button-handler Dec 19 21:52:53 bletchley button-handler[521]: Multi-host system detected : 6 Dec 19 21:52:53 bletchley button-handler[521]: 1 is invalid power event. skipping... ```
- After ``` root@bletchley:~# journalctl -u phosphor-button-handler Dec 19 21:34:58 bletchley button-handler[418]: Multi-host system detected : 6 Dec 19 21:34:58 bletchley button-handler[418]: handlePowerEvent : handle long power button press ```
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I77977f23f9e669cd4a8785608f1cb3ca4d148bed
show more ...
|
c7645850 | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
markdownlint: fix all warnings
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7e544b426f83fb62a2b5637feb0b7df573dc02d2 |
793f9b85 | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: Icdded708a43b0186f80e7391c323f16e345ac5b4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|