Просмотр исходного кода

base-files: use max_brightness to set LED

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 <[email protected]>

SVN-Revision: 47854
John Crispin 10 лет назад
Родитель
Сommit
ec6b85ca0e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      package/base-files/files/etc/init.d/led

+ 1 - 1
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"