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

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

power: qpnp-fg: only enable 100 soc pulse request for PMi8994



PMi8994 had a hardware bug where ESR pulses were not requested when the
battery SOC is 100%. However, this was fixed in later revisions to the
fuel gauge, so this is no longer needed.

CRs-Fixed: 838574
Change-Id: Ia51e6f5d7f1241431af1e4575b156fefb965ce30
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent e849bd31
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ enum pmic_subtype {
enum wa_flags {
	IADC_GAIN_COMP_WA = BIT(0),
	USE_CC_SOC_REG = BIT(1),
	PULSE_REQUEST_WA = BIT(2)
};

enum current_sense_type {
@@ -3242,7 +3243,7 @@ static void status_change_work(struct work_struct *work)
			enable_irq_wake(chip->batt_irq[VBATT_LOW].irq);
			chip->vbat_low_irq_enabled = true;
		}
		if (capacity == 100)
		if (!!(chip->wa_flag & PULSE_REQUEST_WA) && capacity == 100)
			fg_configure_soc(chip);
	} else if (chip->status == POWER_SUPPLY_STATUS_DISCHARGING) {
		if (chip->vbat_low_irq_enabled) {
@@ -5889,6 +5890,7 @@ static int fg_hw_init(struct fg_chip *chip)
	switch (chip->pmic_subtype) {
	case PMI8994:
		rc = fg_8994_hw_init(chip);
		chip->wa_flag |= PULSE_REQUEST_WA;
		break;
	case PMI8996:
	case PMI8950: