Verified Commit c906ce44 authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak
Browse files

max17042_battery: Trigger model refresh when setting charge_full_design

The new value isn't taken into account until a refresh is triggered.
parent ddf94453
......@@ -457,6 +457,11 @@ static int max17042_set_property(struct power_supply *psy,
do_div(data64, 5000000ll);
ret = regmap_write(map, MAX17042_DesignCap, (u32)data64);
if (chip->chip_type &&
(chip->chip_type == MAXIM_DEVICE_TYPE_MAX17055)) {
regmap_write_bits(map, MAX17055_ModelCfg, MAX17055_REFRESH_BIT, MAX17055_REFRESH_BIT);
ret = regmap_read(map, MAX17042_TALRT_Th, &data);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment