commit | dd5495cf40d5911fb9ad04acc6689ae8af054524 | [log] [tgz] |
---|---|---|
author | Naveen Moses <naveen.mosess@hcl.com> | Fri Dec 03 22:40:46 2021 +0530 |
committer | Naveen Moses <naveen.mosess@hcl.com> | Fri Dec 03 22:50:34 2021 +0530 |
tree | 7628fd0e4b036e87126c11ae589de6fe5b38466b | |
parent | 8381d5aa3525e15f1e4bd1f3a5af815107716872 [diff] |
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
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" } ] },
}