diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2021-11-20 18:53:20 +0300 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2021-11-22 19:16:25 +0300 |
commit | 50425ccf2467db9f4134a60a95ef6b6a580222cb (patch) | |
tree | 10fa4a03d59f757010261888ba45e81449008767 /drivers/power | |
parent | fc81c435a8a67c72939b44e851111b2991d5ac51 (diff) | |
download | linux-50425ccf2467db9f4134a60a95ef6b6a580222cb.tar.xz |
power: supply: ab8500: Standardize internal resistance
The nominal internal resistance isn't used by the AB8500
charging code, instead this resistance is measured continuously,
but we anyways migrate this to the standard property in
struct power_supply_battery_info.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/ab8500-bm.h | 2 | ||||
-rw-r--r-- | drivers/power/supply/ab8500_bmdata.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/supply/ab8500-bm.h b/drivers/power/supply/ab8500-bm.h index b21d3a99471f..7e00f480756b 100644 --- a/drivers/power/supply/ab8500-bm.h +++ b/drivers/power/supply/ab8500-bm.h @@ -388,7 +388,6 @@ struct ab8500_maxim_parameters { * @maint_b_chg_timer_h: charge time in maintenance B state * @low_high_cur_lvl: charger current in temp low/high state in mA * @low_high_vol_lvl: charger voltage in temp low/high state in mV' - * @battery_resistance: battery inner resistance in mOhm. * @n_r_t_tbl_elements: number of elements in r_to_t_tbl * @r_to_t_tbl: table containing resistance to temp points * @n_v_cap_tbl_elements: number of elements in v_to_cap_tbl @@ -411,7 +410,6 @@ struct ab8500_battery_type { int maint_b_chg_timer_h; int low_high_cur_lvl; int low_high_vol_lvl; - int battery_resistance; int n_temp_tbl_elements; const struct ab8500_res_to_temp *r_to_t_tbl; int n_v_cap_tbl_elements; diff --git a/drivers/power/supply/ab8500_bmdata.c b/drivers/power/supply/ab8500_bmdata.c index 684cefccebd1..981003105af6 100644 --- a/drivers/power/supply/ab8500_bmdata.c +++ b/drivers/power/supply/ab8500_bmdata.c @@ -83,7 +83,6 @@ static const struct batres_vs_temp temp_to_batres_tbl_thermistor[] = { static struct ab8500_battery_type bat_type_thermistor_unknown = { .resis_high = 0, .resis_low = 0, - .battery_resistance = 300, .termination_curr = 200, .recharge_cap = 95, .normal_cur_lvl = 400, @@ -204,6 +203,9 @@ int ab8500_bm_of_probe(struct power_supply *psy, bi->overvoltage_limit_uv = 4050000; } + if (bi->factory_internal_resistance_uohm < 0) + bi->factory_internal_resistance_uohm = 300000; + if (bi->temp_min == INT_MIN) bi->temp_min = AB8500_TEMP_UNDER; if (bi->temp_max == INT_MAX) |