meta-facebook: yosemite4: enable obmc-phosphor-buttons support
Support OCP debug card use in the yosemite4 system.
Change-Id: I72a4b20a3241e1097dc3fcb053afa4362ee2b370
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json b/meta-facebook/meta-yosemite4/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json
new file mode 100644
index 0000000..98cfb24
--- /dev/null
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json
@@ -0,0 +1,10 @@
+{
+ "gpio_definitions": [
+ {
+ "name": "HOST_SELECTOR",
+ "group_gpio_config": [],
+ "max_position": 9,
+ "host_selector_map": {}
+ }
+ ]
+}
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend b/meta-facebook/meta-yosemite4/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend
new file mode 100644
index 0000000..91e994e
--- /dev/null
+++ b/meta-facebook/meta-yosemite4/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-yosemite4/recipes-phosphor/images/fb-yosemite4-phosphor-image.inc b/meta-facebook/meta-yosemite4/recipes-phosphor/images/fb-yosemite4-phosphor-image.inc
index 2b5727e..16a77f6 100644
--- a/meta-facebook/meta-yosemite4/recipes-phosphor/images/fb-yosemite4-phosphor-image.inc
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/images/fb-yosemite4-phosphor-image.inc
@@ -14,9 +14,11 @@
OBMC_IMAGE_EXTRA_INSTALL:append = " \
plat-svc \
"
-
+# Enable obmc-phosphor-buttons which needed by debug card function.
OBMC_IMAGE_EXTRA_INSTALL:append = " \
phosphor-gpio-monitor \
+ obmc-phosphor-buttons-signals \
+ obmc-phosphor-buttons-handler \
"
# This enables the feature of dbus-monitor which defined in