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

Commit b7c4c2f8 authored by LuK1337's avatar LuK1337 Committed by KakatkarAkshay
Browse files

power: smb5-lib: Prevent USB switching when PD is active



* This code was present in OOS 10 kernel and without it
headset+charge adapters aren't working properly.

Signed-off-by: default avatarAmolAmrit <amol.amrit03@outlook.com>
parent ed7230e2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -8728,6 +8728,12 @@ static void set_usb_switch(struct smb_charger *chg, bool enable)
		pr_err("no fast_charger register found\n");
		return;
	}

        if (chg->pd_active) {
		pr_info("%s:pd_active return\n", __func__);
		return;
	}

	if (enable) {
		pr_err("switch on fastchg\n");
		chg->switch_on_fastchg = true;