commit | a1af329f5746d754f5f3b13f70078f19e773726f | [log] [tgz] |
---|---|---|
author | Naveen Moses <naveen.mosess@hcl.com> | Wed Dec 15 11:47:01 2021 +0530 |
committer | Naveen Moses <naveen.mosess@hcl.com> | Mon Jan 31 11:56:56 2022 +0530 |
tree | c181ecbccc0f87400b815a2c2d8f347f68a44ae4 | |
parent | dd5495cf40d5911fb9ad04acc6689ae8af054524 [diff] |
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
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" } ] },
}