summaryrefslogtreecommitdiffstats
path: root/drivers/power/ab8500_bmdata.c
diff options
context:
space:
mode:
authorMarcus Cooper <marcus.xm.cooper@stericsson.com>2013-01-11 13:12:54 +0000
committerAnton Vorontsov <anton@enomsg.org>2013-01-15 17:43:46 -0800
commitea4024017831d61874351defe8f8c58ae73f8009 (patch)
tree0411f756d15ee826c05a603e1218125a0410fcc0 /drivers/power/ab8500_bmdata.c
parenta864c5a869dcdb40617fc15166385e0ffa609592 (diff)
downloadblackbird-op-linux-ea4024017831d61874351defe8f8c58ae73f8009.tar.gz
blackbird-op-linux-ea4024017831d61874351defe8f8c58ae73f8009.zip
ab8500_bm: Recharge condition not optimal for battery
Today the battery recharge is determined with a voltage threshold. This voltage threshold is only valid when the battery is relaxed. In charging algorithm the voltage read is the loaded battery voltage and no compensation is done to get the relaxed voltage. When maintenance charging is not selected, this makes the recharging condition to almost immediately activate when there is a discharge present on the battery. Depending on which vendor the battery comes from this behavior can wear out the battery much faster than normal. The fuelgauge driver is responsible to monitor the actual battery capacity and is able to estimate the remaining capacity. It is better to use the remaining capacity as a limit to determine when battery should be recharged. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com> Reviewed-by: Hakan BERG <hakan.berg@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power/ab8500_bmdata.c')
-rw-r--r--drivers/power/ab8500_bmdata.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/power/ab8500_bmdata.c b/drivers/power/ab8500_bmdata.c
index 0bf52369d6a5..20c157b4fe99 100644
--- a/drivers/power/ab8500_bmdata.c
+++ b/drivers/power/ab8500_bmdata.c
@@ -192,7 +192,7 @@ static struct abx500_battery_type bat_type_thermistor[] = {
.nominal_voltage = 3700,
.termination_vol = 4050,
.termination_curr = 200,
- .recharge_vol = 3990,
+ .recharge_cap = 95,
.normal_cur_lvl = 400,
.normal_vol_lvl = 4100,
.maint_a_cur_lvl = 400,
@@ -219,7 +219,7 @@ static struct abx500_battery_type bat_type_thermistor[] = {
.nominal_voltage = 3600,
.termination_vol = 4150,
.termination_curr = 80,
- .recharge_vol = 4130,
+ .recharge_cap = 95,
.normal_cur_lvl = 700,
.normal_vol_lvl = 4200,
.maint_a_cur_lvl = 600,
@@ -247,7 +247,7 @@ static struct abx500_battery_type bat_type_thermistor[] = {
.nominal_voltage = 3600,
.termination_vol = 4150,
.termination_curr = 80,
- .recharge_vol = 4130,
+ .recharge_cap = 95,
.normal_cur_lvl = 700,
.normal_vol_lvl = 4200,
.maint_a_cur_lvl = 600,
@@ -278,7 +278,7 @@ static struct abx500_battery_type bat_type_ext_thermistor[] = {
.nominal_voltage = 3700,
.termination_vol = 4050,
.termination_curr = 200,
- .recharge_vol = 3990,
+ .recharge_cap = 95,
.normal_cur_lvl = 400,
.normal_vol_lvl = 4100,
.maint_a_cur_lvl = 400,
@@ -310,7 +310,7 @@ static struct abx500_battery_type bat_type_ext_thermistor[] = {
.nominal_voltage = 3700,
.termination_vol = 4150,
.termination_curr = 100,
- .recharge_vol = 4130,
+ .recharge_cap = 95,
.normal_cur_lvl = 700,
.normal_vol_lvl = 4200,
.maint_a_cur_lvl = 600,
@@ -337,7 +337,7 @@ static struct abx500_battery_type bat_type_ext_thermistor[] = {
.nominal_voltage = 3700,
.termination_vol = 4150,
.termination_curr = 100,
- .recharge_vol = 4130,
+ .recharge_cap = 95,
.normal_cur_lvl = 700,
.normal_vol_lvl = 4200,
.maint_a_cur_lvl = 600,
@@ -364,7 +364,7 @@ static struct abx500_battery_type bat_type_ext_thermistor[] = {
.nominal_voltage = 3700,
.termination_vol = 4150,
.termination_curr = 100,
- .recharge_vol = 4130,
+ .recharge_cap = 95,
.normal_cur_lvl = 700,
.normal_vol_lvl = 4200,
.maint_a_cur_lvl = 600,
@@ -405,8 +405,8 @@ static const struct abx500_fg_parameters fg = {
.lowbat_threshold = 3100,
.battok_falling_th_sel0 = 2860,
.battok_raising_th_sel1 = 2860,
+ .maint_thres = 95,
.user_cap_limit = 15,
- .maint_thres = 97,
};
static const struct abx500_maxim_parameters maxi_params = {
@@ -435,6 +435,7 @@ struct abx500_bm_data ab8500_bm_data = {
.bkup_bat_v = BUP_VCH_SEL_2P6V,
.bkup_bat_i = BUP_ICH_SEL_150UA,
.no_maintenance = false,
+ .capacity_scaling = false,
.adc_therm = ABx500_ADC_THERM_BATCTRL,
.chg_unknown_bat = false,
.enable_overshoot = false,
@@ -479,7 +480,7 @@ int __devinit ab8500_bm_of_probe(struct device *dev,
bm->chg_unknown_bat = true;
bm->bat_type[BATTERY_UNKNOWN].charge_full_design = 2600;
bm->bat_type[BATTERY_UNKNOWN].termination_vol = 4150;
- bm->bat_type[BATTERY_UNKNOWN].recharge_vol = 4130;
+ bm->bat_type[BATTERY_UNKNOWN].recharge_cap = 95;
bm->bat_type[BATTERY_UNKNOWN].normal_cur_lvl = 520;
bm->bat_type[BATTERY_UNKNOWN].normal_vol_lvl = 4200;
}
OpenPOWER on IntegriCloud