From 558f910df59d2f912cf17f89d261e934f4b71095 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Wed, 9 Feb 2011 01:15:46 +0100 Subject: [PATCH] op_power.sh: Changed the script so it uses op_cpuspeed.sh for setting the CPU speed (system conform) --- testdata/scripts/op_power.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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}') -- 2.39.2