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

Commit ff1be165 authored by Fenglin Wu's avatar Fenglin Wu Committed by Gerrit - the friendly Code Review server
Browse files

power: smb1360: update battery status immediately after enabling charger



Update battery power supply change after setting CHARGING_ENABLED
property. This notifies it to the userspace immediately.

Change-Id: I39cd6aa317459cd0ae406bf5f343f3a75a32906b
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent a2556175
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1000,6 +1000,7 @@ static int smb1360_battery_set_property(struct power_supply *psy,
	switch (prop) {
	case POWER_SUPPLY_PROP_CHARGING_ENABLED:
		smb1360_charging_disable(chip, USER, !val->intval);
		power_supply_changed(&chip->batt_psy);
		break;
	case POWER_SUPPLY_PROP_CAPACITY:
		chip->fake_battery_soc = val->intval;