diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-11 11:20:27 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-11 11:20:27 -0800 |
commit | 039053c11965a33250e75009e37dab8e7580fa4e (patch) | |
tree | 88f014a8261dbc94bc10309425f3ceb8a2cc7b36 /drivers/power/supply/bq25980_charger.c | |
parent | 7db48b6b4a03c067159a1dbd8f917453ae3154cb (diff) | |
parent | 25fd330370ac40653671f323acc7fb6db27ef6fe (diff) |
Merge tag 'for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel:
"Power-supply core:
- introduce "No Battery" health status
- use library interpolation
- add power_supply_battery_info documentation
- migrate power_supply_battery_info to be fully heap allocated making
it more obvious that it needs to be free'd manually
Drivers:
- max77976-charger: new driver
- qcom-smbb: add pm8226 charger support
- bq25890-charger: support battery temperature readings
- ab8500: continue migrating towards using standard core APIs"
* tag 'for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits)
power: supply_core: Pass pointer to battery info
power: supply: ab8500: Fix the error handling path of ab8500_charger_probe()
power: reset: mt6397: Check for null res pointer
power: bq25890: add POWER_SUPPLY_PROP_TEMP
power: supply: qcom_smbb: support pm8226
dt-bindings: power: supply: pm8941-charger: add pm8226
power: supply: ab8500: Standardize capacity lookup
power: supply: ab8500: Standardize temp res lookup
power: supply: ab8500: Standardize CV voltage
power: supply: ab8500: Standardize CC current
power: supply: ab8500: Make recharge capacity a constant
power: supply: ab8500: Standardize termination current
power: supply: ab8500: Standardize internal resistance
power: supply: ab8500_fg: Init battery data in bind()
power: supply: ab8500: Standardize voltages
power: supply: ab8500: Standardize technology
power: supply: ab8500: Standardize design capacity
power: supply: ab8500: Use only one battery type
power: supply: ab8500: Drop unused battery types
power: supply: ab8500: Standardize operating temperature
...
Diffstat (limited to 'drivers/power/supply/bq25980_charger.c')
-rw-r--r-- | drivers/power/supply/bq25980_charger.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/supply/bq25980_charger.c b/drivers/power/supply/bq25980_charger.c index 0008c229fd9c..9daa6d14db4d 100644 --- a/drivers/power/supply/bq25980_charger.c +++ b/drivers/power/supply/bq25980_charger.c @@ -1079,7 +1079,7 @@ static int bq25980_power_supply_init(struct bq25980_device *bq, static int bq25980_hw_init(struct bq25980_device *bq) { - struct power_supply_battery_info bat_info = { }; + struct power_supply_battery_info *bat_info; int wd_reg_val = BQ25980_WATCHDOG_DIS; int wd_max_val = BQ25980_NUM_WD_VAL - 1; int ret = 0; @@ -1112,8 +1112,8 @@ static int bq25980_hw_init(struct bq25980_device *bq) return -EINVAL; } - bq->init_data.ichg_max = bat_info.constant_charge_current_max_ua; - bq->init_data.vreg_max = bat_info.constant_charge_voltage_max_uv; + bq->init_data.ichg_max = bat_info->constant_charge_current_max_ua; + bq->init_data.vreg_max = bat_info->constant_charge_voltage_max_uv; if (bq->state.bypass) { ret = regmap_update_bits(bq->regmap, BQ25980_CHRGR_CTRL_2, |