diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2022-01-29 03:49:17 +0300 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2022-02-11 22:24:53 +0300 |
commit | 2b0e7ac0841b3906aeecf432567b02af683a596c (patch) | |
tree | 66e3f624cabb0dc8866709d846bf319417d5c38c /drivers/power/supply/ab8500_bmdata.c | |
parent | d662a7df36e1edc65eaf166ec1c8527ce9d088ea (diff) | |
download | linux-2b0e7ac0841b3906aeecf432567b02af683a596c.tar.xz |
power: supply: ab8500: Integrate thermal zone
Instead of providing our own homebrewn thermal measurement
code for an NTC and passing tables, we put the NTC thermistor
into the device tree, create a passive thermal zone, and poll
this thermal zone for the temperature.
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.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/power/supply/ab8500_bmdata.c b/drivers/power/supply/ab8500_bmdata.c index 62b63f0437dd..d8fc72be0f0e 100644 --- a/drivers/power/supply/ab8500_bmdata.c +++ b/drivers/power/supply/ab8500_bmdata.c @@ -44,28 +44,6 @@ static struct power_supply_battery_ocv_table ocv_cap_tbl[] = { }; /* - * Note that the res_to_temp table must be strictly sorted by falling - * resistance values to work. - */ -static const struct ab8500_res_to_temp temp_tbl[] = { - {-5, 214834}, - { 0, 162943}, - { 5, 124820}, - {10, 96520}, - {15, 75306}, - {20, 59254}, - {25, 47000}, - {30, 37566}, - {35, 30245}, - {40, 24520}, - {45, 20010}, - {50, 16432}, - {55, 13576}, - {60, 11280}, - {65, 9425}, -}; - -/* * Note that the batres_vs_temp table must be strictly sorted by falling * temperature values to work. Factory resistance is 300 mOhm and the * resistance values to the right are percentages of 300 mOhm. @@ -92,8 +70,6 @@ static struct ab8500_battery_type bat_type_thermistor_unknown = { .maint_b_chg_timer_h = 200, .low_high_cur_lvl = 300, .low_high_vol_lvl = 4000, - .n_temp_tbl_elements = ARRAY_SIZE(temp_tbl), - .r_to_t_tbl = temp_tbl, }; static const struct ab8500_bm_capacity_levels cap_levels = { |