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

Commit 84daeecc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-smbcharger: Update get_prop_batt_status method"

parents ca416f50 4028ab2c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -758,7 +758,8 @@ static int get_prop_batt_status(struct smbchg_chip *chip)
	u8 reg = 0, chg_type;
	bool charger_present, chg_inhibit;

	charger_present = is_usb_present(chip) | is_dc_present(chip);
	charger_present = is_usb_present(chip) | is_dc_present(chip) |
			  chip->hvdcp_3_det_ignore_uv;
	if (!charger_present)
		return POWER_SUPPLY_STATUS_DISCHARGING;

@@ -792,7 +793,7 @@ static int get_prop_batt_status(struct smbchg_chip *chip)

	chg_type = (reg & CHG_TYPE_MASK) >> CHG_TYPE_SHIFT;

	if (chg_type == BATT_NOT_CHG_VAL)
	if (chg_type == BATT_NOT_CHG_VAL && !chip->hvdcp_3_det_ignore_uv)
		status = POWER_SUPPLY_STATUS_DISCHARGING;
	else
		status = POWER_SUPPLY_STATUS_CHARGING;