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

Commit f6bceac2 authored by Xiaozhe Shi's avatar Xiaozhe Shi Committed by Abhijeet Dharmapurikar
Browse files

power: qpnp-smbcharger: allow noncompliant chargers to parallel charge



Current the parallel charging algorithm rejects all non-DCP adapters.
Change this so it only disallows SDPs and CDPs, so that it also allows
non-compliant chargers to use both charge paths.

Change-Id: Id4aecfaa56a7a69bf75b7adb93514c4d20dc8ad1
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent b6319beb
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1192,8 +1192,13 @@ static bool smbchg_is_parallel_usb_ok(struct smbchg_chip *chip)
		return false;
	}

	if (get_usb_supply_type(reg) != POWER_SUPPLY_TYPE_USB_DCP) {
		pr_smb(PR_STATUS, "not a DCP, skipping\n");
	if (get_usb_supply_type(reg) == POWER_SUPPLY_TYPE_USB_CDP) {
		pr_smb(PR_STATUS, "CDP adapter, skipping\n");
		return false;
	}

	if (get_usb_supply_type(reg) == POWER_SUPPLY_TYPE_USB) {
		pr_smb(PR_STATUS, "SDP adapter, skipping\n");
		return false;
	}