commit | 3bd1cfcb7d8293b1694aebb7f0e47fd53f7a5f60 | [log] [tgz] |
---|---|---|
author | Naveen Moses <naveen.mosess@hcl.com> | Mon Feb 14 18:04:20 2022 +0530 |
committer | Naveen Moses <naveen.mosess@hcl.com> | Tue Apr 05 16:21:13 2022 +0530 |
tree | 565fe42de279406c7fb2a398b1e51b00a78abd5a | |
parent | eea8a4a5f764d61cb96b14867a78f7e975e75656 [diff] |
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
Phosphor-buttons has a collection of IO event handler interfaces for physical inputs which are part of OCP front panel.
It defines an individual dbus interface object for each physical button/switch inputs such as power button, reset button etc. Each of this button interfaces monitors it's associated io for event changes and calls the respective event handlers.
In order to monitor a button/input interface the
respective gpio config details should be mentioned in the gpio defs json file - "/etc/default/obmc/gpio/gpio_defs.json"
{ "gpio_definitions": [ { "name": "POWER_BUTTON", "gpio_config" :[ { "pin": "D0", "direction": "both" } ] }, { "name": "RESET_BUTTON", "gpio_config" :[ { "pin": "AB0", "direction": "both" } ] }, { "name" : "HOST_SELECTOR",
"gpio_config" : [ { "pin": "AA4", "direction": "both" }, { "pin": "AA5", "direction": "both" }, { "pin": "AA6", "direction": "both" }, { "pin": "AA7", "direction": "both" } ] },
}