summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/ab8500_bmdata.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-11-20 16:53:12 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-11-22 17:16:25 +0100
commit3aca6ecdab44b30e812001ab4de19b79001a3fbd (patch)
tree077fa1227f4eb962a51bf0dc0d62ebad4ef7824d /drivers/power/supply/ab8500_bmdata.c
parentpower: supply: ab8500: Use core battery parser (diff)
downloadlinux-3aca6ecdab44b30e812001ab4de19b79001a3fbd.tar.xz
linux-3aca6ecdab44b30e812001ab4de19b79001a3fbd.zip
power: supply: ab8500: Sink current tables into charger code
The two tables for input and output current translation from register values does not need to be passed around from the battery manager data. Just push it down into the charger code where it is used, like other tables in that code. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply/ab8500_bmdata.c')
-rw-r--r--drivers/power/supply/ab8500_bmdata.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/power/supply/ab8500_bmdata.c b/drivers/power/supply/ab8500_bmdata.c
index a515dfad4c3f..6f6865c46926 100644
--- a/drivers/power/supply/ab8500_bmdata.c
+++ b/drivers/power/supply/ab8500_bmdata.c
@@ -436,24 +436,6 @@ static const struct ab8500_bm_charger_parameters chg = {
.ac_curr_max = 1500,
};
-/*
- * This array maps the raw hex value to charger output current used by the
- * AB8500 values
- */
-static int ab8500_charge_output_curr_map[] = {
- 100, 200, 300, 400, 500, 600, 700, 800,
- 900, 1000, 1100, 1200, 1300, 1400, 1500, 1500,
-};
-
-/*
- * This array maps the raw hex value to charger input current used by the
- * AB8500 values
- */
-static int ab8500_charge_input_curr_map[] = {
- 50, 98, 193, 290, 380, 450, 500, 600,
- 700, 800, 900, 1000, 1100, 1300, 1400, 1500,
-};
-
struct ab8500_bm_data ab8500_bm_data = {
.temp_under = 3,
.temp_low = 8,
@@ -479,13 +461,9 @@ struct ab8500_bm_data ab8500_bm_data = {
.interval_not_charging = 120,
.temp_hysteresis = 3,
.gnd_lift_resistance = 34,
- .chg_output_curr = ab8500_charge_output_curr_map,
- .n_chg_out_curr = ARRAY_SIZE(ab8500_charge_output_curr_map),
.maxi = &ab8500_maxi_params,
.chg_params = &chg,
.fg_params = &fg,
- .chg_input_curr = ab8500_charge_input_curr_map,
- .n_chg_in_curr = ARRAY_SIZE(ab8500_charge_input_curr_map),
};
int ab8500_bm_of_probe(struct power_supply *psy,