#
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 ...
|
#
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 ...
|
#
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 ...
|
#
e3b4e11f |
| 26-Nov-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
Change-Id: I32e5f22829c03325295b180504ab5e3b5745dc95 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
a6d4e65d |
| 13-Apr-2022 |
Naveen Moses <naveen.mosess@hcl.com> |
Add OCP debug card host selector button interface
A new button interface class definition is added for handling OCP debug card host selector button events. In case of the button release event, The h
Add OCP debug card host selector button interface
A new button interface class definition is added for handling OCP debug card host selector button events. In case of the button release event, The host selector property is increased up to the max host position.
Design : https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/45544
Signed-off-by: Naveen Moses <naveen.mosess@hcl.com> Change-Id: Iec8fabb00d1daa10f587981a9c77df8a62e3c373
show more ...
|
#
9a529a69 |
| 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: I91502c85799b7d3be22b7d05659ff26bea08c32b
show more ...
|
#
ab8dac51 |
| 15-Jul-2022 |
Naveen Moses <naveen.mosess@hcl.com> |
Rename handler methods to match dbus signal type
The button handler process has multiple handlers which monitors for "Released" dbus signal but has handlers named "pressed". Such handlers has been r
Rename handler methods to match dbus signal type
The button handler process has multiple handlers which monitors for "Released" dbus signal but has handlers named "pressed". Such handlers has been renamed to match the signal type.
Signed-off-by: Naveen Moses <naveen.mosess@hcl.com> Change-Id: Iff77569259df620dba2b04ed64ffc029fd9dee46
show more ...
|
#
d6a1bae7 |
| 20-Jun-2022 |
George Liu <liuxiwei@inspur.com> |
meson: Add meson build
The intent behind this commit is build obmc-phosphor-buttons with meson, and then remove files related to cmake.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ie
meson: Add meson build
The intent behind this commit is build obmc-phosphor-buttons with meson, and then remove files related to cmake.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Iedf8c49224032e016fed3471e6e41f6055b09065
show more ...
|
#
94afa4ba |
| 20-Jun-2022 |
George Liu <liuxiwei@inspur.com> |
Fix cppcheck warnings
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I18be21d5141630a1da3d5e54740b54a9a06496d9
|
#
3bd1cfcb |
| 14-Feb-2022 |
Naveen Moses <naveen.mosess@hcl.com> |
Add Host selector button interface
This change includes new button interface for the host selector switch.
The button handler code is adapted to support both single host and multiple host power co
Add Host selector button interface
This change includes new button interface for the host selector switch.
The button handler code is adapted to support both single host and multiple host power control dbus events.
design : https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/45544
Signed-off-by: Naveen Moses <naveen.mosess@hcl.com> Change-Id: Icbfb22baaee057fd255c3ab0cba129693b913a9d
show more ...
|
#
69f93512 |
| 26-Nov-2018 |
Matt Spinler <spinler@us.ibm.com> |
button-handler: Add ID button actions Creates a signal handler for the 'Released' signal. The handler will toggle the 'Asserted' property in the LED group defined by the configu
button-handler: Add ID button actions Creates a signal handler for the 'Released' signal. The handler will toggle the 'Asserted' property in the LED group defined by the configure file. The default group is 'enclosure_identify'. The effect of this is the LEDs in the group will toggle on or off on each button press. Tested: Used the 'simPress' method on the ID button object. Change-Id: I9f68a8b3fae02efc7f6cfb6dbcf8a45cce7f2d9c Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
06a5bddf |
| 26-Nov-2018 |
Matt Spinler <spinler@us.ibm.com> |
button-handler: Add reset button actions Creates a signal handler for the 'Released' signal. This will reboot the host if it is powered on. If the system is off, it won't do an
button-handler: Add reset button actions Creates a signal handler for the 'Released' signal. This will reboot the host if it is powered on. If the system is off, it won't do anything. As with the other buttons, it only installs the watch if the button object exists. Tested: Used the 'simPress' method on the reset object to trigger the signal. Change-Id: I4102cd8c260d07afb018b2c186e78a768e642a18 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
963c65f3 |
| 26-Nov-2018 |
Matt Spinler <spinler@us.ibm.com> |
button-handler: Add power button actions Create match handlers for the following power button signals: 1) 'Released' * If the system is off, then power it on. * If the syste
button-handler: Add power button actions Create match handlers for the following power button signals: 1) 'Released' * If the system is off, then power it on. * If the system is on, then soft power it off. 2) 'PressedLong' (Really means long press released) * If the system is on, do an immediate power off. * If the system is off, do nothing. It only installs the match objects for these if the power button object exists on D-Bus. This is done so that systems that don't implement a certain button won't still have watches on their signals. Tested: Pushed buttons and watched the magic happen. Change-Id: I6d17529d0dafc237f90a0e6a121e4b5da1204f81 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
fb35a325 |
| 26-Nov-2018 |
Matt Spinler <spinler@us.ibm.com> |
Add button-handler framework This new application will listen for button press signals generated by the xyz.openbmc_project.Chassis.Buttons code and perform the necessary actions, li
Add button-handler framework This new application will listen for button press signals generated by the xyz.openbmc_project.Chassis.Buttons code and perform the necessary actions, like powering off when the power button is pressed. This first commit is just the framework, and all of the functionality will follow. Change-Id: Ia877684627b53e0fcc6f4b0b82063811e8ced6ea Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|