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

Commit 87e9f62d authored by yangfangbiao's avatar yangfangbiao Committed by hecaiqiang
Browse files

Optimize the charge status update

Change-Id: I8579e1d19c25eab0393c26d89fecce7cd4a918eb
(cherry picked from commit 8a7e775a46bb95f63371b8491322cf42b657e1bb)
parent 94136235
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3070,6 +3070,11 @@ int smblib_get_prop_usb_online(struct smb_charger *chg,
		val->intval = true;
		return rc;
	}
	chg->dash_on = get_prop_fast_chg_started(chg);
	if (chg->dash_on) {
		val->intval = true;
		return rc;
	}
	if (is_client_vote_enabled(chg->usb_icl_votable,
					CHG_TERMINATION_VOTER)) {
		rc = smblib_get_prop_usb_present(chg, val);
@@ -6778,8 +6783,10 @@ static int set_dash_charger_present(int status)
			vote(g_chg->usb_icl_votable, PD_VOTER, true,
					DEFAULT_WALL_CHG_MA * 1000);
		}
		if (g_chg->dash_present)
		if (g_chg->dash_present) {
			g_chg->real_charger_type = POWER_SUPPLY_TYPE_DASH;
			g_chg->usb_psy_desc.type = POWER_SUPPLY_TYPE_DASH;
		}
		power_supply_changed(g_chg->batt_psy);
		pr_info("dash_present = %d, charger_present = %d\n",
				g_chg->dash_present, charger_present);