From: Michael Mrozek Date: Wed, 9 Feb 2011 00:15:46 +0000 (+0100) Subject: op_power.sh: Changed the script so it uses op_cpuspeed.sh for setting X-Git-Tag: sz_beta3~75^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=commitdiff_plain;h=558f910df59d2f912cf17f89d261e934f4b71095 op_power.sh: Changed the script so it uses op_cpuspeed.sh for setting the CPU speed (system conform) --- diff --git a/testdata/scripts/op_power.sh b/testdata/scripts/op_power.sh index b5ce213..aabc8bd 100755 --- a/testdata/scripts/op_power.sh +++ b/testdata/scripts/op_power.sh @@ -11,11 +11,7 @@ if [ "$1" -le "2" ]; then # button was pressed 1-2sec, "suspend" if [ $powerstate -eq "1" ]; then #in lowpower mode oldspeed=$(cat /tmp/oldspeed) - if [ $oldspeed -gt 14 ] && [ $oldspeed -le 900 ]; then - echo $oldspeed > /proc/pandora/cpu_mhz_max - else - echo 500 > /proc/pandora/cpu_mhz_max - fi + /usr/pandora/scripts/op_cpuspeed.sh $oldspeed echo 0 > /tmp/powerstate oldbright=$(cat /tmp/oldbright) maxbright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/max_brightness) @@ -69,7 +65,7 @@ if [ "$1" -le "2" ]; then # button was pressed 1-2sec, "suspend" echo 0 > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank echo 16 > /sys/class/leds/pandora\:\:power/brightness #dim power LED - echo 125 > /proc/pandora/cpu_mhz_max + /usr/pandora/scripts/op_cpuspeed.sh 125 fi elif [ "$1" -ge "3" ]; then #button was pressed 3 sec or longer, shutdown xfceuser=$(ps u -C xfce4-session | tail -n1 | awk '{print $1}')