[Gta04-owner] charging battery

Liz edodd at billiau.net
Mon Apr 22 12:02:23 CEST 2013


> 
> This should reveal useful information.
> 
Battery 1
root at neo:~# echo "USB Charger"
USB Charger
root at neo:~# echo "============"
============
root at neo:~# echo online:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/online
2>/dev/null)

online: 1
root at neo:~# echo type:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/type)

type: USB
root at neo:~# echo status:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/status
2>/dev/null)

status: Charging
root at neo:~# echo volt:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/voltage_now
2>/dev/null)uV

volt: 4803786uV
root at neo:~# echo current:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/current_now
2>/dev/null)uA

current: 487749uA
root at neo:~# echo ID:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-0048/twl4030_usb/id
2>/dev/null) ID: floating root at neo:~# 
root at neo:~# echo

root at neo:~# echo "AC Charger"
AC Charger
root at neo:~# echo "============"
============
root at neo:~# echo online:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/online
2>/dev/null) online: 0 root at neo:~# echo type:
2>$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/type
2>2>/dev/null)
type: Mains
root at neo:~# echo status:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/status
2>/dev/null) status: Not charging root at neo:~# echo volt:
2>$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/voltage_now
2>2>/dev/null)uV
volt: uV
root at neo:~# echo current:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/current_now
2>/dev/null)uA current: uA root at neo:~# 
root at neo:~# # see
http://www.mjmwired.net/kernel/Documentation/hwmon/twl4030-madc-hwmon
root at neo:~# echo

root at neo:~# echo "Main Battery"
Main Battery
root at neo:~# echo "============"
============
root at neo:~#
VOLT=$(cat /sys/devices/platform/twl4030_madc_hwmon/in12_input)
root at neo:~# echo volt: ${VOLT}mV ca. $(expr \( "$VOLT" - 3300 \) \*
100 / 950)% volt: 4187mV ca. 93% root at neo:~# echo current:
$(cat /sys/devices/platform/twl4030_madc_hwmon/curr10_input)mA current:
504mA root at neo:~# echo temp:
$(cat /sys/devices/platform/twl4030_madc_hwmon/temp1_input) temp: 26
root at neo:~# echo type:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in0_input)mV type: 0mV
root at neo:~# echo ADC7:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in7_input)mV# MICSENSE
ADC7: 21mV# MICSENSE root at neo:~# echo VBUS:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in8_input)mV VBUS: 4810mV
root at neo:~# echo VCHG:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in11_input)mV VCHG: 9mV
root at neo:~# 
root at neo:~# echo

root at neo:~# echo "Backup battery"
Backup battery
root at neo:~# echo "=============="
==============
root at neo:~# echo volt:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in9_input)mV volt: 3206mV
root at neo:~# 
root at neo:~# echo

root at neo:~# echo "BQ27000 (if HDQ works)"
BQ27000 (if HDQ works)
root at neo:~# echo "======================"
======================
root at neo:~# echo present:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/present
2>/dev/null) present: 1 root at neo:~# echo type:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/type
2>2>/dev/null)
type: Battery
root at neo:~# echo technology:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/technology
2>/dev/null) technology: Li-ion root at neo:~# echo capacity:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/capacity
2>2>/dev/null)%
capacity: 97%
root at neo:~# echo status:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/status
2>/dev/null) status: Charging root at neo:~# echo level:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/capacity_level
2>2>/dev/null)
level: Normal
root at neo:~# echo volt:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/voltage_now
2>/dev/null)uV volt: 4177000uV root at neo:~# echo current:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/current_now
2>2>/dev/null)uA
current: -110670uA
root at neo:~# echo temp:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/temp
2>/dev/null)/10 temp: 313/10 root at neo:~# echo charge:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/charge_now
2>2>/dev/null)uAh
charge: 1121158uAh
root at neo:~# echo full:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/charge_full
2>/dev/null)uAh full: 1153110uAh root at neo:~# echo design:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/charge_full_design
2>2>/dev/null)uAh
design: 1233792uAh
root at neo:~# echo energy:
"$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/energy
2>/dev/null)J?" energy: J? root at neo:~# echo power:
2>"$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/power
2>2>/dev/null)W?"
power: W?
root at neo:~# echo cycles:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/cycle_co
> echo health:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-batte
> echo discharge:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/time_to_em
> echo remaining:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/time_to_empty_n
> echo charging:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/time_to_full_now
> 2>
> 
=============================

change battery to old battery without rebooting phone, as phone won't
boot with old battery in place
==============================

Battery 0
root at neo:~# echo "USB Charger"
USB Charger
root at neo:~# echo "============"

============
root at neo:~# echo online:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/online
2>/dev/null)

online: 1
root at neo:~# echo type:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/type)

type: USB
root at neo:~# echo status:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/status
2>/dev/null)

status: Charging
root at neo:~# echo volt:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/voltage_now
2>/dev/null)uV

volt: 4783257uV
root at neo:~# echo current:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_usb/current_now
2>/dev/null)uA

current: 514337uA
root at neo:~# echo ID:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-0048/twl4030_usb/id
2>/dev/null) ID: floating root at neo:~# 
root at neo:~# echo

root at neo:~# echo "AC Charger"
AC Charger
root at neo:~# echo "============"
============
root at neo:~# echo online:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/online
2>/dev/null) online: 0 root at neo:~# echo type:
2>$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/type
2>2>/dev/null)
type: Mains
root at neo:~# echo status:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/status
2>/dev/null) status: Not charging root at neo:~# echo volt:
2>$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/voltage_now
2>2>/dev/null)uV
volt: uV
root at neo:~# echo current:
$(cat /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/power_supply/twl4030_ac/current_now
2>/dev/null)uA current: uA root at neo:~# 
root at neo:~# # see
http://www.mjmwired.net/kernel/Documentation/hwmon/twl4030-madc-hwmon
root at neo:~# echo

root at neo:~# echo "Main Battery"
Main Battery
root at neo:~# echo "============"
============
root at neo:~#
VOLT=$(cat /sys/devices/platform/twl4030_madc_hwmon/in12_input)
root at neo:~# echo volt: ${VOLT}mV ca. $(expr \( "$VOLT" - 3300 \) \*
100 / 950)% volt: 3067mV ca. -24% root at neo:~# echo current:
$(cat /sys/devices/platform/twl4030_madc_hwmon/curr10_input)mA current:
609mA root at neo:~# echo temp:
$(cat /sys/devices/platform/twl4030_madc_hwmon/temp1_input) temp: 25
root at neo:~# echo type:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in0_input)mV type: 0mV
root at neo:~# echo ADC7:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in7_input)mV# MICSENSE
ADC7: 24mV# MICSENSE root at neo:~# echo VBUS:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in8_input)mV VBUS: 4796mV
root at neo:~# echo VCHG:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in11_input)mV VCHG: 9mV
root at neo:~# 
root at neo:~# echo

root at neo:~# echo "Backup battery"
Backup battery
root at neo:~# echo "=============="
==============
root at neo:~# echo volt:
$(cat /sys/devices/platform/twl4030_madc_hwmon/in9_input)mV volt: 3184mV
root at neo:~# 
root at neo:~# echo

root at neo:~# echo "BQ27000 (if HDQ works)"
BQ27000 (if HDQ works)
root at neo:~# echo "======================"
======================
root at neo:~# echo present:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/present
2>/dev/null) present: 1 root at neo:~# echo type:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/type
2>2>/dev/null)
type: Battery
root at neo:~# echo technology:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/technology
2>/dev/null) technology: Li-ion root at neo:~# echo capacity:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/capacity
2>2>/dev/null)%
capacity: 0%
root at neo:~# echo status:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/status
2>/dev/null) status: Charging root at neo:~# echo level:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/capacity_level
2>2>/dev/null)
level: Normal
root at neo:~# echo volt:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/voltage_now
2>/dev/null)uV volt: 3089000uV root at neo:~# echo current:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/current_now
2>2>/dev/null)uA
current: -206703uA
root at neo:~# echo temp:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/temp
2>/dev/null)/10 temp: 268/10 root at neo:~# echo charge:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/charge_now
2>2>/dev/null)uAh
charge: 0uAh
root at neo:~# echo full:
$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/charge_full
2>/dev/null)uAh full: 1119016uAh root at neo:~# echo design:
2>$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/charge_full_design
2>2>/dev/null)uAh
design: 1233792uAh
root at neo:~# echo energy:
"$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/energy
2>/dev/null)J?" energy: J? root at neo:~# echo power:
2>"$(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/power
2>2>/dev/nul
> echo cycles:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/cycle_count
> 2 echo health:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-batte
> echo discharge:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/time_to_em
> echo remaining:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/time_to_empty_n
> echo charging:
> $(cat /sys/devices/w1_bus_master1/01-000000000000/bq27000-battery/power_supply/bq27000-battery/time_to_full_now
> 2>
> 


More information about the Gta04-owner mailing list