projects
/
openwrt
/
staging
/
svanheule.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
354aa80
)
base-files: use max_brightness to set LED
author
John Crispin
<john@openwrt.org>
Fri, 11 Dec 2015 15:06:11 +0000
(15:06 +0000)
committer
John Crispin
<john@openwrt.org>
Fri, 11 Dec 2015 15:06:11 +0000
(15:06 +0000)
LEDs which are controlled by a PWM need to use the supplied
max_brightness instead. Otherwise they might appear to be
very dim / broken.
Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>
SVN-Revision: 47854
package/base-files/files/etc/init.d/led
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/init.d/led
b/package/base-files/files/etc/init.d/led
index 3f457324990eadfd461be567d5b432cdc53837fe..84cd028bd8d28f923fa64bd6a554befbef56de1b 100755
(executable)
--- a/
package/base-files/files/etc/init.d/led
+++ b/
package/base-files/files/etc/init.d/led
@@
-44,7
+44,7
@@
load_led() {
ret="$?"
[ $default = 1 ] &&
-
echo 1 >
/sys/class/leds/${sysfs}/brightness
+
cat /sys/class/leds/${sysfs}/max_brightness >
/sys/class/leds/${sysfs}/brightness
[ $ret = 0 ] || {
echo >&2 "Skipping trigger '$trigger' for led '$name' due to missing kernel module"