diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:09:32 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:09:32 +0000 |
commit | 24afca6cf30a4f6e5c95e673bf10f78d16a27a73 (patch) | |
tree | eb55c58633ec99953b60c07fb130f0bcdbd79916 /drivers/ata/pata_of_platform.c | |
parent | 17be374225290ab7156962e112a9bcb5d48fbbd5 (diff) |
introduce-bq27000-battery-driver.patch
This is a driver for the bq27000 found in the Highcell A5
battery, and the platform device stuff for it for GTA02. It
is a Power Supply Class battery device.
The driver doesn't contain an HDQ engine but accepts pointers
from the platform data to the HDQ action routines; our
platform data plugs it into the FIQ HDQ engine stuff.
The Power Supply class exposes the battery down /sys so you
can find out battery status by doing the equivalent of this
bash command
for i in capacity charge_full current_now present status technology temp time_to_empty_now time_to_full_now type voltage_now ; do echo -n "$i " ; cat /sys/devices/platform/bq27000-battery.0/power_supply/bat/$i ; done
Here is the kind of result you get from a battery discharging
capacity 0
charge_full 1215585
current_now 183375
present 1
status Discharging
technology Li-ion
temp 276
time_to_empty_now 0
time_to_full_now 3932100
type Battery
voltage_now 2761000
Note that temp is in 1/10 degrees C, other values are in uV,
uA, uW. The time_to_* reported are bogus, but that is what
the battery actually reports.
We can make more mappings to entries in power_supply class
but this is enough to get started with.
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/ata/pata_of_platform.c')
0 files changed, 0 insertions, 0 deletions