New recipe for setting Witherspoon fan speeds

For bringup use to set the fans to a fixed value until the real
fan control code is ready.  Can be removed then.

Change-Id: I9e07d371222e19b542fd0c211180f5c5f5747061
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meta-witherspoon/recipes-phosphor/fans/fan-default-speed.bb b/meta-witherspoon/recipes-phosphor/fans/fan-default-speed.bb
new file mode 100644
index 0000000..a758c91
--- /dev/null
+++ b/meta-witherspoon/recipes-phosphor/fans/fan-default-speed.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Set Witherspoon fan default speeds"
+DESCRIPTION = "Sets all fans to a single speed"
+PR = "r1"
+
+inherit allarch
+inherit obmc-phosphor-license
+inherit obmc-phosphor-systemd
+
+RDEPENDS_${PN} += "i2c-tools"
+
+S = "${WORKDIR}"
+SRC_URI += "file://set_fan_speeds.sh"
+
+TMPL = "fan-default-speed@.service"
+INSTFMT = "fan-default-speed@{0}.service"
+TGTFMT = "obmc-chassis-start@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
+
+do_install() {
+        install -d ${D}${bindir}
+        install -m 0755 ${WORKDIR}/set_fan_speeds.sh ${D}${bindir}/set_fan_speeds.sh
+}
diff --git a/meta-witherspoon/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-witherspoon/recipes-phosphor/images/obmc-phosphor-image.bbappend
new file mode 100644
index 0000000..fa330be
--- /dev/null
+++ b/meta-witherspoon/recipes-phosphor/images/obmc-phosphor-image.bbappend
@@ -0,0 +1 @@
+OBMC_IMAGE_EXTRA_INSTALL_append = " fan-default-speed"