pandora-scripts: reset led brightness when disabled
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 29 May 2016 16:26:38 +0000 (19:26 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 29 May 2016 16:29:23 +0000 (19:29 +0300)
Changing the trigger to none turns off the LED but keeps brightness,
which causes the LED to be turned on after suspend. Could be fixed in
the kernel but easier to work around here.

recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_ledsettings.sh
recipes/pandora-system/pandora-version.bb

index 7f98f57..8309a0e 100644 (file)
@@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 
 RDEPENDS = "bash sed gawk grep zenity"
 
-PR = "r168"
+PR = "r169"
 
 SRC_URI = " \
           file://op_bright.sh \
index 3377b74..756e2db 100644 (file)
@@ -63,6 +63,7 @@ case $mainsel in
     sed -i "s/.*pandora::sd1.*/pandora::sd1 mmc0/g" /etc/default/leds 
   else
     echo none > /sys/class/leds/pandora\:\:sd1/trigger
+    echo 0 > /sys/class/leds/pandora\:\:sd1/brightness
     sed -i "s/.*pandora::sd1.*/pandora::sd1 none/g" /etc/default/leds 
   fi
   ;;
@@ -73,6 +74,7 @@ case $mainsel in
     sed -i "s/.*pandora::sd2.*/pandora::sd2 mmc1/g" /etc/default/leds 
   else
     echo none > /sys/class/leds/pandora\:\:sd2/trigger
+    echo 0 > /sys/class/leds/pandora\:\:sd2/brightness
     sed -i "s/.*pandora::sd2.*/pandora::sd2 none/g" /etc/default/leds 
   fi
   ;;
@@ -88,6 +90,7 @@ case $mainsel in
     fi
   else
     echo none > /sys/class/leds/pandora\:\:bluetooth/trigger
+    echo 0 > /sys/class/leds/pandora\:\:bluetooth/brightness
     sed -i "s/.*pandora::bluetooth.*/pandora::bluetooth none/g" /etc/default/leds 
   fi
   ;;
@@ -121,6 +124,7 @@ case $mainsel in
     zenity --info --title="WiFi LED Set" --text "The WiFi LED has been enabled.\nPlease note: You need to disable and re-enable WiFi before it switches on again." --timeout 6
   else
     echo none > /sys/class/leds/pandora\:\:wifi/trigger
+    echo 0 > /sys/class/leds/pandora\:\:wifi/brightness
     sed -i "s/.*pandora::wifi.*/pandora::wifi none/g" /etc/default/leds 
   fi
   ;;
index ac2d27c..12eb1ea 100644 (file)
@@ -1,6 +1,6 @@
 DESCRIPTION = "Installs /etc/op-version file."
 LICENSE = "Public Domain"
-PR = "r28"
+PR = "r29"
 
 do_install() {
   OLD_PWD=$PWD