diff options
author | Nikolaus Voss <n.voss@weinmann.de> | 2012-04-25 02:59:03 -0400 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-05-05 23:05:07 -0400 |
commit | b1f092f6480e0a9d8d5f99d3363e022952d1af83 (patch) | |
tree | 8956a59d678c97679bf1bd58635bf740388e453d | |
parent | 81a08382aeb802ad642ab7f2a7786baa7bafaaa3 (diff) |
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>
-rw-r--r-- | drivers/power/sbs-battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c index 06b659d91790..a5b6849d4123 100644 --- a/drivers/power/sbs-battery.c +++ b/drivers/power/sbs-battery.c | |||
@@ -89,7 +89,7 @@ static const struct chip_data { | |||
89 | [REG_CURRENT] = | 89 | [REG_CURRENT] = |
90 | SBS_DATA(POWER_SUPPLY_PROP_CURRENT_NOW, 0x0A, -32768, 32767), | 90 | SBS_DATA(POWER_SUPPLY_PROP_CURRENT_NOW, 0x0A, -32768, 32767), |
91 | [REG_CAPACITY] = | 91 | [REG_CAPACITY] = |
92 | SBS_DATA(POWER_SUPPLY_PROP_CAPACITY, 0x0E, 0, 100), | 92 | SBS_DATA(POWER_SUPPLY_PROP_CAPACITY, 0x0D, 0, 100), |
93 | [REG_REMAINING_CAPACITY] = | 93 | [REG_REMAINING_CAPACITY] = |
94 | SBS_DATA(POWER_SUPPLY_PROP_ENERGY_NOW, 0x0F, 0, 65535), | 94 | SBS_DATA(POWER_SUPPLY_PROP_ENERGY_NOW, 0x0F, 0, 65535), |
95 | [REG_REMAINING_CAPACITY_CHARGE] = | 95 | [REG_REMAINING_CAPACITY_CHARGE] = |