Hello, > With "echo > /sys/bus/spi/devices/spi2.0/state sleep", the current drops > from 82.125 mA to 81.562 mA within 10 minutes. The battery is fully charged > before test. > > My kernel: > # uname -a > Linux om-gta02 2.6.28-rc4 #1 PREEMPT Sun Feb 8 19:53:16 CET 2009 armv4tl > unknown
It may be the case that the fixes for the current leak were introduced in devel branch (linux-openmoko-devel). On kernel 2.6.29-rc3, my tests show a drop from cca 80mA to cca 47mA. Richard > > Before read your reply, I get nothing by removing SD card, ifdown usb0, power > off backlight. > > Here is the new script I used: > > #!/bin/bash > > # for exit SSH shell, unplug USB > sleep 5 > > # strange, 1 to power of backlight > echo > /sys/class/backlight/gta02-bl/bl_power 1 > > echo > /sys/bus/spi/devices/spi2.0/state sleep > > for ((i=0; i<20; i++)); do > echo "i = $i:" > cat /sys/class/power_supply/battery/{current_now,capacity,voltage_now} > sleep 30 > done > > echo > /sys/class/backlight/gta02-bl/bl_power 0 > echo > /sys/bus/spi/devices/spi2.0/state normal > > But comparing to your ~50 mA, 82 mA is still too large :) > > Could anybody who has latest SHR installation on GTA02, give a test to verify? > > Before start this script, please make sure: > 1. `/sys/bus/platform/devices/neo1973-pm-gps.0/pwron` output 0, else you can > echo 0 into it. > 2. disable GSM/WIFI/Bluetooth in SHR settings > 3. SSH to FR through USB if you haven't connect to it. > 4. stop /etc/init.d/xserver-nodm, /etc/init.d/frameworkd > 5. killall batget; killall wakerd; > 6. start the above script, e.g. `power.sh > output_power.txt &` , exit SSH > shell, unplug USB > > 10 minutes later, you can plug USB and SSH into FR again. If you can't wait > for 10 minutes, > modify "sleep 30" to "sleep 5" or something else. > > I'd like to say "thank you" to Rask Ingemann Lambertsen again :) > > > On Fri, Mar 27, 2009 at 05:21:59AM +0800, Qingyou Meng wrote: > >> To set brightness: write (brightness_percent / 100 * 255) to file >> "/sys/class/backlight/gta02-bl/brightness" > > I think that's why you get so high currents. This > > # echo >/sys/class/backlight/gta02-bl/brightness 0 > > doesn't do what you hope it does. You should try > > # echo > >/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.9/glamo3362.0/glamo-spi-gpio.0/spi2.0/state > sleep > > also. A shorthand for that file is /sys/bus/spi/devices/spi2.0/state. When > the display isn't blanked, it reads 'normal'. > > But, IMHO, consider using a higher-level interface (such as > freesmartphone.org) to turn off the display instead of trying to find all > the places to mess with under /sys yourself. > _______________________________________________ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community