History log of /openbmc/phosphor-buttons/ (Results 26 – 50 of 90)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
10bc3aeb12-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 ...

b748fdb504-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>

1a309f7704-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 ...

9479b06c04-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 ...

ccd7db0509-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 ...

0d038f5810-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 ...

395c764c18-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 ...

149452b012-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 ...

06b1060312-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 ...

4fcfadd314-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 ...

ce24bf6309-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 ...

c0fee46e23-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 ...

e2d0f42619-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 ...

c764585008-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

markdownlint: fix all warnings

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I7e544b426f83fb62a2b5637feb0b7df573dc02d2

793f9b8508-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 ...

e3b4e11f26-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 ...

d219fa3c19-Jul-2022 Naveen Moses <naveen.mosess@hcl.com>

Add serial uart mux interface class

1. This change adds the multi-host serial uart mux interface class.

In a multi-host system when the host position is changed,
then the serial uart mux is configu

Add serial uart mux interface class

1. This change adds the multi-host serial uart mux interface class.

In a multi-host system when the host position is changed,
then the serial uart mux is configured to enable the
respective host's serial console which is accessed via
OCP debug card.

2. Introduced two new methods in gpio.cpp
setGpioState - set state for gpio fd based on polarity
getGpiostate - get state for gpio fd based on polarity

3. Updated the readme file about details on the new gpio
configs

design : https://github.com/openbmc/docs/blob/master/designs/multihost-phosphor-buttons.md

Testing : This change is verified in yosemiteV2 platform.

Signed-off-by: Naveen Moses <naveen.mosess@hcl.com>
Change-Id: I861d70570650d7dfcab842a35bdcf63a9fdd3bd0

show more ...

4250785711-Aug-2022 Thang Q. Nguyen <thang@os.amperecomputing.com>

Fix getService fail on single host platform

Add exception handling in the getService() function to so that the
isMultiHost() function returns correct value for single and multi-host
platform.

Teste

Fix getService fail on single host platform

Add exception handling in the getService() function to so that the
isMultiHost() function returns correct value for single and multi-host
platform.

Tested: check on single host platform
1. Press power button and check if it works properly
2. Press reset button and check if it work properly

Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: I5c7019fb27b6ccb795ada9c63e591ce8561ff70c

show more ...

a6d4e65d13-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 ...

9a529a6922-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 ...

7897dc6f04-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

MAINTAINERS: remove file

The MAINTAINERS file is deprecated in favor of OWNERS.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I98ec98d7e78a7437e0583d484c57a188b013bfb9


ab8dac5115-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 ...

8d281f1b22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

OWNERS: switch 'matches' to 'matchers'

The original OWNERS template had a mistake which used 'matches' instead
of the field supported by the Gerrit plugin 'matchers'. Update the
OWNERS file to have

OWNERS: switch 'matches' to 'matchers'

The original OWNERS template had a mistake which used 'matches' instead
of the field supported by the Gerrit plugin 'matchers'. Update the
OWNERS file to have the correct field.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I3abf54e79b1dba1e3583dac623ddcf6cdb9b1c8c

show more ...

ba33275d07-Jul-2022 George Liu <liuxiwei@inspur.com>

Fix meson build

Since the previous patch did not enable LOOKUP_GPIO_BASE and
incorrectly defined the object path, etc., the buttons process
failed to start, this commit fixes these problems

Signed-

Fix meson build

Since the previous patch did not enable LOOKUP_GPIO_BASE and
incorrectly defined the object path, etc., the buttons process
failed to start, this commit fixes these problems

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I0285795370d751db2d0fe738cae5645df3d7c955

show more ...

f756f8b005-Jul-2022 George Liu <liuxiwei@inspur.com>

meson: Update LONG_PRESS_TIME_MS

According to the needs of each company, the value of
LONG_PRESS_TIME_MS should be configurable, so moved to the
meson_option.txt file

Signed-off-by: George Liu <liu

meson: Update LONG_PRESS_TIME_MS

According to the needs of each company, the value of
LONG_PRESS_TIME_MS should be configurable, so moved to the
meson_option.txt file

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I90efafe4ea134ec66ab8eca0b8faf418d97bad1f

show more ...

1234