History log of /openbmc/phosphor-buttons/src/main.cpp (Results 1 – 18 of 18)
Revision Date Author Comments
# 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 ...


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


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


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


# d219fa3c 19-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 ...


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


# 9fb15970 20-Jun-2022 George Liu <liuxiwei@inspur.com>

logging: switch to lg2

After switching to C++20, it is recommended to use `phosphor::lg2`
to format log, and the correct `CODE_LINE` and `CODE_FUNC` values
can be used in log tracking.

Signed-off-b

logging: switch to lg2

After switching to C++20, it is recommended to use `phosphor::lg2`
to format log, and the correct `CODE_LINE` and `CODE_FUNC` values
can be used in log tracking.

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

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


# 5b98f4db 20-Jun-2022 George Liu <liuxiwei@inspur.com>

Update clang-format

Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format

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

Update clang-format

Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format

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

show more ...


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


# eea8a4a5 17-Feb-2022 Naveen Moses <naveen.mosess@hcl.com>

Fix parsing gpio config format issue

A recent change was submitted regarding addition of
new gpio config format to support group gpio config and
respective config parser change. This change caused
a

Fix parsing gpio config format issue

A recent change was submitted regarding addition of
new gpio config format to support group gpio config and
respective config parser change. This change caused
app crash for platforms using previous config format.

This is resolved with this fix by adding parser support for
both config formats.

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

show more ...


# a1af329f 15-Dec-2021 Naveen Moses <naveen.mosess@hcl.com>

Add abstract factory to create button iface objects

A abstract factory class is implemented to return
the instance of button interface class based on the
button iface formfactor name provided as
pa

Add abstract factory to create button iface objects

A abstract factory class is implemented to return
the instance of button interface class based on the
button iface formfactor name provided as
parameter to the abstract factory createInstance
method.

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

show more ...


# dd5495cf 03-Dec-2021 Naveen Moses <naveen.mosess@hcl.com>

Enable group gpio configuration

This change adds support to configure single
as well as group gpio config using a single api(configGroupGpio()).
This change is introduced to support the button/input

Enable group gpio configuration

This change adds support to configure single
as well as group gpio config using a single api(configGroupGpio()).
This change is introduced to support the button/input
interfaces which has multiple gpios associated with them.

As an improvement reading of gpio def json file is
done once in main function rather than reading it
everytime before creating the button interface object.

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

show more ...


# 6d724ce8 06-Oct-2021 Patrick Williams <patrick@stwcx.xyz>

catch exceptions as const

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


# 8605bdff 05-Nov-2018 Matt Spinler <spinler@us.ibm.com>

Only create buttons when their GPIOs are defined

Look in /etc/default/obmc/gpio/gpio_defs.json to see
if the GPIO for a button is defined, and only create
the button object if it is.

This is how a

Only create buttons when their GPIOs are defined

Look in /etc/default/obmc/gpio/gpio_defs.json to see
if the GPIO for a button is defined, and only create
the button object if it is.

This is how a system implementer can specify which
button objects are needed for their particular system.

Change-Id: I359f87875b6bb5741fdf4718b30b0f5b4552a528
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 0d9377d2 01-Nov-2018 Patrick Venture <venture@google.com>

Add clang-format to repo

Add clang-format to repo.

Change-Id: I5cc1e4ed3fcbf41a28e16cf929a86cf54a3c5efb
Signed-off-by: Patrick Venture <venture@google.com>


# a9d39e30 14-Aug-2018 Kuiying Wang <kuiying.wang@intel.com>

Implement phosphor-buttons based C++ and sdbusplus interfaces.

This phosphor-buttons module handles all the physical buttons
like Reset/Power/ID button pressed/released signals and the
simulate sign

Implement phosphor-buttons based C++ and sdbusplus interfaces.

This phosphor-buttons module handles all the physical buttons
like Reset/Power/ID button pressed/released signals and the
simulate signals on button pressed/released in WebUI.

All the signals are exposed into dbus and let other
modules be aware.

Change-Id: I52144718ef54d403c5221e5afd0216b9494f8523
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>

show more ...