leds: Add unit file and udev rule for sysfs
Change-Id: I6f299b818534fc2e9f5262fdcf85688d16cc1286
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules b/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules
new file mode 100644
index 0000000..2a32912
--- /dev/null
+++ b/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="leds", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.led.controller@sys$devpath"
diff --git a/common/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service b/common/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
new file mode 100644
index 0000000..a475bd0
--- /dev/null
+++ b/common/recipes-phosphor/leds/phosphor-led-sysfs/xyz.openbmc_project.led.controller@.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Phosphor sysfs LED controller
+
+[Service]
+Restart=always
+ExecStart={sbindir}/phosphor-ledcontroller -p %f