From 0f0cdb27cec59d2a178970e86c6112f24feaf1d4 Mon Sep 17 00:00:00 2001 From: Vishwanatha Subbanna Date: Thu, 8 Jun 2017 19:08:25 +0530 Subject: LEDS: Update udev rule to pass $name than $devpath Physical LED controller expects a sysfs path where it can find leds. Current UDEV rule is passing $devpath and that works fine. Because '-' is converted to '/' when systemd unit file processes it, application needs to put a workaround to fetch the name of LED correctly if the LED itself contains '-' in it. Although $devpath still works to apply that workaround, it becomes difficult for the workaround to look for a particular directory to go beyond looking for led-name since not all LEDs would be having /sys/devices/platform/leds/leds. However, all of those would share 'sys-class-leds' and hence passing 'sys-class-leds' with $name makes it appropriate. Change-Id: Iab5c71cf0c6f601a25b9b4470b46d7fc4d930223 Signed-off-by: Vishwanatha Subbanna --- .../common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-phosphor') diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules index 2a3291262..372d81293 100644 --- a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules +++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules @@ -1 +1 @@ -SUBSYSTEM=="leds", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.led.controller@sys$devpath" +SUBSYSTEM=="leds", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.led.controller@sys-class-leds-$name" -- cgit v1.2.1