[shr-testing] Forcing fast charge mode

Adam Jimerson vendion at gmail.com
Fri May 22 02:27:18 CEST 2009


On Thursday 21 May 2009 06:26:46 pm Vikas Saurabh wrote:
> Check out
> 
http://wiki.openmoko.org/wiki/GTA02_sysfs#GTA02_Kernel_sysfs_highlights_for
>_kernel_2.6.28. specifically:
>    charger_type =
> "/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-mbc/chg_curlim" #limit
> that freerunner would accept
>    capacity = "/sys/class/power_supply/battery/capacity"
>    voltage = "/sys/class/power_supply/battery/voltage_now"
>    status = "/sys/class/power_supply/battery/status"
>    image_dir = "/usr/share/battery/"
>    usb_limit =
> "/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-mbc/usb_curlim" #current that
> is actually coming

The only thing I wasn't able to quite figure out where it when is the voltage, 
here is the current configuration for the bash script, hopefully someone here 
will be able to tell where it goes and double checks this script before any 
phones get killed by bad settings:

# SYS-Files and other settings
# pmu_chgmode:       tells what the charger status is (eg. "fast")
# pmu_chgtype:       tells in which charge mode we are currently running
# pmu_chgstate:      tells the charget state (what charger is detected)
# pmu_curlim:        tells us the current charge limit
# pmu_chgfile:       enables us to supply an override charge mode
# bat_status:        tells us the current status of the battery (if its 
charging etc)
# bat_capacity:      current capacity of the battery
# bat_tech:          technology of the battery, "Li-ion" for fics standard 
battery
# bat_present:       1 if a battery is in place, 0 if not
# bat_ttf & bat_tte: Time to full and time to empty
pmu_chgmode="/sys/devices/platform/s3c2440-i2c/i2c-
adapter/i2c-0/0-0073/chgmode"
pmu_chgtype="/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-mbc/chg_curlim"
pmu_chgstate="/sys/devices/platform/s3c2440-i2c/i2c-
adapter/i2c-0/0-0073/chgstate"
pmu_curlim="/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-mbc/usb_curlim"
pmu_chgfile="/sys/devices/platform/s3c2440-i2c/i2c-
adapter/i2c-0/0-0073/force_usb_limit_dangerou

bat_status="/sys/class/power_supply/battery/status"
bat_capacity="/sys/class/power_supply/battery/capacity"
bat_tech="/sys/devices/platform/bq27000-battery.0/power_supply/bat/technology"
bat_present="/usr/share/battery/"
bat_ttf="/sys/devices/platform/bq27000-
battery.0/power_supply/bat/time_to_full_now"
bat_tte="/sys/devices/platform/bq27000-
battery.0/power_supply/bat/time_to_empty_now"

With the current setup I get this error from the script: File not found: 
/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/chgmode!
 my guess would be this may be where it should be pointed to the voltage_now 
file because everything else I was able to match up, but again I'm not quite 
sure about this.
-- 
"We must plan for freedom, and not only for security, if for no other reason 
than only freedom can make security more secure."  Karl Popper
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.openmoko.org/pipermail/community/attachments/20090521/4461d9f0/attachment.pgp 


More information about the community mailing list