diff options
author | Dirk Brandewie <dirk.brandewie@gmail.com> | 2012-01-24 12:26:08 -0500 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-03-26 12:40:47 -0400 |
commit | 13e0aa469e11f31a83f32f614c1331630851af28 (patch) | |
tree | 37322f1fbb77d4c4b5512ffad5904f795cf94e1f /drivers/power/max17042_battery.c | |
parent | e5f3872d20448706d3bb8083ee82a9226d3f8b5c (diff) |
max17042: Change capacity property to use reported SOC register
The SOC register (0dh) reports the state of charge before empty
compensation adjustments are applied. The max value reported by this
register will decrease as the battery ages.
Use the RepSOC register (06h) to report the capacity of the
battery. RepSOC contains a filtered version of the battery capacity
after empty compensation adjustments have been applied.
Reported-by: Gary Keyes <gary.e.keyes@intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power/max17042_battery.c')
-rw-r--r-- | drivers/power/max17042_battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c index 3a30a27b094c..bd88debf9d52 100644 --- a/drivers/power/max17042_battery.c +++ b/drivers/power/max17042_battery.c | |||
@@ -171,7 +171,7 @@ static int max17042_get_property(struct power_supply *psy, | |||
171 | val->intval = ret * 625 / 8; | 171 | val->intval = ret * 625 / 8; |
172 | break; | 172 | break; |
173 | case POWER_SUPPLY_PROP_CAPACITY: | 173 | case POWER_SUPPLY_PROP_CAPACITY: |
174 | ret = max17042_read_reg(chip->client, MAX17042_SOC); | 174 | ret = max17042_read_reg(chip->client, MAX17042_RepSOC); |
175 | if (ret < 0) | 175 | if (ret < 0) |
176 | return ret; | 176 | return ret; |
177 | 177 | ||