From 811a8f0df348ad0f139db352913948a8a69831ee Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sun, 29 May 2016 19:26:38 +0300 Subject: [PATCH 1/1] pandora-scripts: reset led brightness when disabled 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 | 2 +- recipes/pandora-system/pandora-scripts/op_ledsettings.sh | 4 ++++ recipes/pandora-system/pandora-version.bb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/pandora-system/pandora-scripts.bb b/recipes/pandora-system/pandora-scripts.bb index 7f98f57..8309a0e 100644 --- a/recipes/pandora-system/pandora-scripts.bb +++ b/recipes/pandora-system/pandora-scripts.bb @@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" RDEPENDS = "bash sed gawk grep zenity" -PR = "r168" +PR = "r169" SRC_URI = " \ file://op_bright.sh \ diff --git a/recipes/pandora-system/pandora-scripts/op_ledsettings.sh b/recipes/pandora-system/pandora-scripts/op_ledsettings.sh index 3377b74..756e2db 100644 --- a/recipes/pandora-system/pandora-scripts/op_ledsettings.sh +++ b/recipes/pandora-system/pandora-scripts/op_ledsettings.sh @@ -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 ;; diff --git a/recipes/pandora-system/pandora-version.bb b/recipes/pandora-system/pandora-version.bb index ac2d27c..12eb1ea 100644 --- a/recipes/pandora-system/pandora-version.bb +++ b/recipes/pandora-system/pandora-version.bb @@ -1,6 +1,6 @@ DESCRIPTION = "Installs /etc/op-version file." LICENSE = "Public Domain" -PR = "r28" +PR = "r29" do_install() { OLD_PWD=$PWD -- 2.39.2