summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/ab8500_btemp.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-11-20 16:53:17 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-11-22 17:16:25 +0100
commit2d3559a50ad6d21552ed2434889bc568acfa2a83 (patch)
tree9760ebd524b1ecee38168eaf55942cd857758ac7 /drivers/power/supply/ab8500_btemp.c
parentpower: supply: ab8500: Standardize design capacity (diff)
downloadlinux-2d3559a50ad6d21552ed2434889bc568acfa2a83.tar.xz
linux-2d3559a50ad6d21552ed2434889bc568acfa2a83.zip
power: supply: ab8500: Standardize technology
The AB8500 custom battery type can be replaced by the corresponding struct power_supply_battery_info field. Remove the struct member and amend the code to use the standard property. 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_btemp.c')
-rw-r--r--drivers/power/supply/ab8500_btemp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
index fbb58074efab..20253b8a7fe9 100644
--- a/drivers/power/supply/ab8500_btemp.c
+++ b/drivers/power/supply/ab8500_btemp.c
@@ -456,7 +456,7 @@ static int ab8500_btemp_measure_temp(struct ab8500_btemp *di)
int rbat, rntc, vntc;
if ((di->bm->adc_therm == AB8500_ADC_THERM_BATCTRL) &&
- (di->bm->bat_type->name == POWER_SUPPLY_TECHNOLOGY_UNKNOWN)) {
+ (di->bm->bi.technology == POWER_SUPPLY_TECHNOLOGY_UNKNOWN)) {
rbat = ab8500_btemp_get_batctrl_res(di);
if (rbat < 0) {
@@ -540,7 +540,7 @@ static int ab8500_btemp_id(struct ab8500_btemp *di)
* that need it.
*/
if ((di->bm->adc_therm == AB8500_ADC_THERM_BATCTRL) &&
- (di->bm->bat_type->name == POWER_SUPPLY_TECHNOLOGY_LIPO) &&
+ (di->bm->bi.technology == POWER_SUPPLY_TECHNOLOGY_LIPO) &&
(res <= 53407) && (res >= 12500)) {
dev_dbg(di->dev, "Set BATCTRL current source to 20uA\n");
di->curr_source = BTEMP_BATCTRL_CURR_SRC_20UA;
@@ -807,7 +807,7 @@ static int ab8500_btemp_get_property(struct power_supply *psy,
val->intval = 1;
break;
case POWER_SUPPLY_PROP_TECHNOLOGY:
- val->intval = di->bm->bat_type->name;
+ val->intval = di->bm->bi.technology;
break;
case POWER_SUPPLY_PROP_TEMP:
val->intval = ab8500_btemp_get_temp(di);