aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/pcf50606-charger.c
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2009-07-26 18:00:29 +0400
committerPaul Fertser <fercerpav@gmail.com>2009-08-02 11:24:27 +0400
commitec22388dfefaf8eda07d12284b8f946d3c6eb148 (patch)
treec6a90296ffceca203058c883d85d111af10e0f4d /drivers/power/pcf50606-charger.c
parent5af71f726c58adeef22afafacc2242fd920f9882 (diff)
gta01_battery: generalise the driver, add capacity estimation
Check if machine-specific hooks exist before calling, this allows to use this driver with gta02 or any other device that is able to provide battery voltage readings. Report an estimate of capacity percentage left, based on discharge curves. Strictly speaking, this is a violation of power_supply class specs but since this is the only driver for dumb batteries and userspace lacks any library to do the estimation itself, we have to stuff it here. Please keep in mind that this estimation is by no means accurate, usually cell phones have only 5 bars to represent charge status. Credit goes to Joerg Reisenweber and SpeedEvil for helping with gathering and analysing the data. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'drivers/power/pcf50606-charger.c')
0 files changed, 0 insertions, 0 deletions