sbs-battery.c: Capacity attr = remaining relative capacity
authorNikolaus Voss <n.voss@weinmann.de>
Wed, 25 Apr 2012 06:59:03 +0000 (08:59 +0200)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Sun, 6 May 2012 03:05:07 +0000 (20:05 -0700)
commitb1f092f6480e0a9d8d5f99d3363e022952d1af83
tree8956a59d678c97679bf1bd58635bf740388e453d
parent81a08382aeb802ad642ab7f2a7786baa7bafaaa3
sbs-battery.c: Capacity attr = remaining relative capacity

Currently, the capacity exported by this driver refers to reg 0x0e,
which is the absolute state of charge which according to SBS
refers to the design capacity/ energy of the battery. It can be
> 100 % and drops below 100 % for a fully charged battery with
the battery aging.

This is not what the user exspects of a remaining capacity
indication between 0 and 100 % with 100 % referring to
a fully charged battery. This is provided by SBS reg 0x0d,
which is the relative state of charge referring to the
full charge capacity.

Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/power/sbs-battery.c