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

Commit 9de298a9 authored by Ashay Jaiswal's avatar Ashay Jaiswal Committed by Kiran Gunda
Browse files

power: smbcharger:add support for PMI8940



PMI8940 uses the same charger block as PMI8950. Add support of
PMI8940 in order to configure charger based on PMIC.

Change-Id: Ifcdc893a6da3b7bd592d78c353b209ab264e5605
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
parent ed489f6b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -308,6 +308,7 @@ enum pmic_subtype {
	PMI8950		= 17,
	PMI8996		= 19,
	PMI8937		= 55,
	PMI8940		= 64,
};

enum smbchg_wa {
@@ -8126,6 +8127,8 @@ static int smbchg_check_chg_version(struct smbchg_chip *chip)
	case PMI8950:
		chip->wa_flags |= SMBCHG_RESTART_WA;
	case PMI8937:
	/* fall through */
	case PMI8940:
		chip->wa_flags |= SMBCHG_BATT_OV_WA;
		if (pmic_rev_id->rev4 < 2) /* PMI8950 1.0 */ {
			chip->wa_flags |= SMBCHG_AICL_DEGLITCH_WA;
@@ -8140,7 +8143,9 @@ static int smbchg_check_chg_version(struct smbchg_chip *chip)
			ARRAY_SIZE(aicl_rerun_period_schg_lite);

		chip->schg_version = QPNP_SCHG_LITE;
		if (pmic_rev_id->pmic_subtype == PMI8937)
		/* PMI8937/PMI8940 doesn't support HVDCP */
		if ((pmic_rev_id->pmic_subtype == PMI8937)
			|| (pmic_rev_id->pmic_subtype == PMI8940))
			chip->hvdcp_not_supported = true;
		break;
	case PMI8996: