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

Commit 766387ed authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qti_battery_charger: call power_supply_changed() if fake_soc is set"

parents c8bbc5bd a8800b4b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -864,6 +864,7 @@ static ssize_t fake_soc_store(struct class *c, struct class_attribute *attr,
{
	struct battery_chg_dev *bcdev = container_of(c, struct battery_chg_dev,
						battery_class);
	struct psy_state *pst = &bcdev->psy_list[PSY_TYPE_BATTERY];
	int val;

	if (kstrtoint(buf, 0, &val))
@@ -872,6 +873,9 @@ static ssize_t fake_soc_store(struct class *c, struct class_attribute *attr,
	bcdev->fake_soc = val;
	pr_debug("Set fake soc to %d\n", val);

	if (IS_ENABLED(CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG) && pst->psy)
		power_supply_changed(pst->psy);

	return count;
}