commit | eea8a4a5f764d61cb96b14867a78f7e975e75656 | [log] [tgz] |
---|---|---|
author | Naveen Moses <naveen.mosess@hcl.com> | Fri Feb 18 01:14:15 2022 +0530 |
committer | Naveen Moses <naveen.mosess@hcl.com> | Tue Feb 22 00:37:22 2022 +0530 |
tree | b5dee574ea1ad9773b644d8c45aed39839e93796 | |
parent | a1af329f5746d754f5f3b13f70078f19e773726f [diff] |
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
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" } ] },
}