meta-facebook: greatlakes: Support phosphor-multi-gpio-monitor config
Description:
- config for set current host state.
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Change-Id: Iacd4df5c6357c6e5be2e192832351b0b9c1d9f61
diff --git a/meta-facebook/meta-greatlakes/recipes-phosphor/gpio/phosphor-gpio-monitor/greatlakes-phosphor-multi-gpio-monitor.json b/meta-facebook/meta-greatlakes/recipes-phosphor/gpio/phosphor-gpio-monitor/greatlakes-phosphor-multi-gpio-monitor.json
new file mode 100644
index 0000000..0519438
--- /dev/null
+++ b/meta-facebook/meta-greatlakes/recipes-phosphor/gpio/phosphor-gpio-monitor/greatlakes-phosphor-multi-gpio-monitor.json
@@ -0,0 +1,34 @@
+[
+ {
+ "Name": "PWROK_STBY_BMC_SLOT1",
+ "ChipId": "0",
+ "GpioNum": 10,
+ "EventMon": "FALLING",
+ "Target": "set-current-host-state@1.service",
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT2",
+ "ChipId": "0",
+ "GpioNum": 11,
+ "EventMon": "FALLING",
+ "Target": "set-current-host-state@2.service",
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT3",
+ "ChipId": "0",
+ "GpioNum": 12,
+ "EventMon": "FALLING",
+ "Target": "set-current-host-state@3.service",
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT4",
+ "ChipId": "0",
+ "GpioNum": 13,
+ "EventMon": "FALLING",
+ "Target": "set-current-host-state@4.service",
+ "Continue": true
+ }
+]
diff --git a/meta-facebook/meta-greatlakes/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-facebook/meta-greatlakes/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
new file mode 100644
index 0000000..b137790
--- /dev/null
+++ b/meta-facebook/meta-greatlakes/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -0,0 +1,9 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://greatlakes-phosphor-multi-gpio-monitor.json"
+
+do_install:append:() {
+ install -d ${D}/usr/share/phosphor-gpio-monitor
+ install -m 0644 ${WORKDIR}/greatlakes-phosphor-multi-gpio-monitor.json \
+ ${D}/usr/share/phosphor-gpio-monitor/phosphor-multi-gpio-monitor.json
+}
diff --git a/meta-facebook/meta-greatlakes/recipes-phosphor/images/fb-greatlakes-phosphor-image.inc b/meta-facebook/meta-greatlakes/recipes-phosphor/images/fb-greatlakes-phosphor-image.inc
index afff8ec..243c159 100644
--- a/meta-facebook/meta-greatlakes/recipes-phosphor/images/fb-greatlakes-phosphor-image.inc
+++ b/meta-facebook/meta-greatlakes/recipes-phosphor/images/fb-greatlakes-phosphor-image.inc
@@ -1,6 +1,7 @@
OBMC_IMAGE_EXTRA_INSTALL:append = " \
greatlakes-sysinit \
greatlakes-gpio-monitor-register \
+ phosphor-gpio-monitor \
"
# Currently, the led related services couldn't complete