meta-facebook: meta-harma: enable obmc-phosphor-buttons support
obmc-phosphor-buttons handles button events and hsot selecting.
In Harma system, the actions of buttons are handled by CPLD, so only
`HOST_SELECTOR` which needed by debug card function (fb-ipmi-oem) is
provided here.
Change-Id: Id9cdc0f1be84377769776b218bbd3a41285f345e
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
diff --git a/meta-facebook/meta-harma/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json b/meta-facebook/meta-harma/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json
new file mode 100644
index 0000000..d66c175
--- /dev/null
+++ b/meta-facebook/meta-harma/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json
@@ -0,0 +1,10 @@
+{
+ "gpio_definitions": [
+ {
+ "name": "HOST_SELECTOR",
+ "group_gpio_config" : [],
+ "max_position" : 1,
+ "host_selector_map" : {}
+ }
+ ]
+}
diff --git a/meta-facebook/meta-harma/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend b/meta-facebook/meta-harma/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend
new file mode 100644
index 0000000..91e994e
--- /dev/null
+++ b/meta-facebook/meta-harma/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://gpio_defs.json"
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/default/obmc/gpio/
+ install -m 0644 ${WORKDIR}/gpio_defs.json ${D}/${sysconfdir}/default/obmc/gpio/
+}
+
+FILES:${PN}-signals:append = " ${sysconfdir}/default/obmc/gpio/gpio_defs.json"
diff --git a/meta-facebook/meta-harma/recipes-phosphor/images/fb-harma-phosphor-image.inc b/meta-facebook/meta-harma/recipes-phosphor/images/fb-harma-phosphor-image.inc
index b602a3d..851d964 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/images/fb-harma-phosphor-image.inc
+++ b/meta-facebook/meta-harma/recipes-phosphor/images/fb-harma-phosphor-image.inc
@@ -14,3 +14,9 @@
OBMC_IMAGE_EXTRA_INSTALL:append = " \
sshpass \
"
+
+# Enable obmc-phosphor-buttons which needed by debug card function.
+OBMC_IMAGE_EXTRA_INSTALL:append = " \
+ obmc-phosphor-buttons-signals \
+ obmc-phosphor-buttons-handler \
+"