commit | 4250785723d92b6578176a2d961d47ab66e08124 | [log] [tgz] |
---|---|---|
author | Thang Q. Nguyen <thang@os.amperecomputing.com> | Fri Aug 12 09:11:35 2022 +0700 |
committer | Thang Q. Nguyen <thang@os.amperecomputing.com> | Wed Sep 21 17:21:04 2022 +0700 |
tree | 59f9aefb91e0f74c6f35e0b8431a1afc54cbad67 | |
parent | a6d4e65d5c4c78f86d690fff31b79db9fa8c3b4c [diff] |
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
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" } ] },
}