meta-bletchley: power-ctrl: add host cycle and reset actions
Add host power cycle and power reset actions
Cycle Action includes following steps:
- 1. AC Off
- 2. AC On
- 3. Power On
Reset Action includes following steps:
- 1. Power Off
- 2. Power On
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I17341ec30776413d428f35498d70534901d250b1
diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-cycle@.service b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-cycle@.service
new file mode 100644
index 0000000..2fb7d9d
--- /dev/null
+++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-cycle@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Sled%i Host Power Cycle
+Requires=motor-init-calibration@%i.service
+After=motor-init-calibration@%i.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/power-ctrl sled%i cycle
+SyslogIdentifier=power-ctrl