Create a new Dbus interface for LED
A new Dbus API method is created in the phosphor-led-sysfs repository
under xyz.openbmc_project.Led.Sysfs.Internal interface name to add or
remove the LED, which will be coming from each udev LED event to
create the LED dbus path.
xyz.openbmc_project.Led.Sysfs.Internal interface
.AddLED method
.RemoveLED method
This Dbus API method is added to support the multihost physical
LEDs design.
https://gerrit.openbmc.org/c/openbmc/docs/+/55230
Also support a executable for LED DBUS API method
Added a new executable for LED DBUS API method to communicate
between udev and application.
Executable will call Dbus API method to pass LED name as argument from
udev, after the primary service started.
Tested : Tested the dbus method is invoked for each LED udev event
in Facebook YosemiteV2 platform.
Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I3fa6c3caa130b2b71ebc9fe8d69541c029f516ab
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/systemd/system/phosphor-ledcontroller.service b/systemd/system/phosphor-ledcontroller.service
new file mode 100644
index 0000000..ecfcfa5
--- /dev/null
+++ b/systemd/system/phosphor-ledcontroller.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Phosphor Sysfs LED Controller
+
+[Service]
+Restart=always
+ExecStart=/usr/libexec/phosphor-led-sysfs/phosphor-ledcontroller
+Type=dbus
+BusName=xyz.openbmc_project.LED.Controller
+
+[Install]
+WantedBy=multi-user.target
diff --git a/systemd/system/sysfs-led@.service b/systemd/system/sysfs-led@.service
new file mode 100644
index 0000000..ad41294
--- /dev/null
+++ b/systemd/system/sysfs-led@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Phosphor Sysfs - Add LED
+After=phosphor-ledcontroller.service
+
+[Service]
+ExecStart=/usr/libexec/phosphor-led-sysfs/add-led-action -p /sys/class/leds/%i
+Type=oneshot
+
+[Install]
+WantedBy=multi-user.target
diff --git a/systemd/system/xyz.openbmc_project.led.controller@.service b/systemd/system/xyz.openbmc_project.led.controller@.service
deleted file mode 100644
index 5c294fd..0000000
--- a/systemd/system/xyz.openbmc_project.led.controller@.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Phosphor sysfs LED controller
-
-[Service]
-Restart=always
-ExecStart=/usr/libexec/phosphor-led-sysfs/phosphor-ledcontroller -p %f