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

Commit defce213 authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

power: qpnp-smbcharger: do not override APSD results



PMI8994 2.0 chargers had a hardware bug where the APSD results for a SDP
USB (Standard Downstream Port), would be 1.5A. The APSD override bit was
set for this reason. Overriding the APSD results was later found to have
a side effect of disabling AICL reruns when switching from 5V to 9V when
using a HVDCP.

In the latest PMI8994 hardware revision (PMI8994 2.0.4) this bug was
fixed. Remove the APSD override bit in order to allow AICL to rerun at
9V for HVDCPs.

CRs-Fixed: 771405
Change-Id: I6e93a0343553b9f1251554ce8b9e2cee0b46e2ad
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent 8269b4cd
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -3748,13 +3748,14 @@ static int smbchg_hw_init(struct smbchg_chip *chip)
	}

	/*
	 * force using current from the register i.e. ignore auto
	 * power source detect (APSD) mA ratings
	 * Do not force using current from the register i.e. use auto
	 * power source detect (APSD) mA ratings for the initial current values.
	 *
	 * If this is set, AICL will not rerun at 9V for HVDCPs
	 */
	reg = USE_REGISTER_FOR_CURRENT;

	rc = smbchg_masked_write(chip, chip->usb_chgpth_base + CMD_IL,
			USE_REGISTER_FOR_CURRENT, USE_REGISTER_FOR_CURRENT);
			USE_REGISTER_FOR_CURRENT, 0);

	if (rc < 0) {
		dev_err(chip->dev, "Couldn't set input limit cmd rc=%d\n", rc);
		return rc;