Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f4d3879 authored by Anirudh Ghayal's avatar Anirudh Ghayal
Browse files

power: qpnp-vm-bms: Notify userspace of every single SOC change



The SOC linearity logic does not notify the intermediate
SOC points if the SOC updates are not linear. Fix this by
calling power_supply_changed for every SOC change.

CRs-Fixed: 726493
Change-Id: Iefa6699c0db08006cf4e4ff3a8d2bdb46f56925f
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent e33b9fba
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1955,6 +1955,9 @@ static void monitor_soc_work(struct work_struct *work)
					/* update last_soc immediately */
					report_vm_bms_soc(chip);

				pr_debug("update bms_psy\n");
				power_supply_changed(&chip->bms_psy);
			} else if (chip->last_soc != chip->calculated_soc) {
				pr_debug("update bms_psy\n");
				power_supply_changed(&chip->bms_psy);
			} else {