diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-06-08 19:08:25 +0530 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-06-13 09:35:59 +0000 |
commit | 0f0cdb27cec59d2a178970e86c6112f24feaf1d4 (patch) | |
tree | 018a98cc149df46b7d306207288c44797492611d /meta-phosphor | |
parent | 33a391e6ca1cd2483963d66824f39a41400588d9 (diff) | |
download | talos-openbmc-0f0cdb27cec59d2a178970e86c6112f24feaf1d4.tar.gz talos-openbmc-0f0cdb27cec59d2a178970e86c6112f24feaf1d4.zip |
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 <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules | 2 |
1 files changed, 1 insertions, 1 deletions
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" |