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

Commit c4266166 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-smb5: Do not set BC1P2_START_ON_CC on DAM"

parents ea1158ef 94b7d70c
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -2166,6 +2166,15 @@ static int smb5_configure_typec(struct smb_charger *chg)

	smblib_apsd_enable(chg, true);

	rc = smblib_read(chg, TYPE_C_SNK_STATUS_REG, &val);
	if (rc < 0) {
		dev_err(chg->dev, "failed to read TYPE_C_SNK_STATUS_REG rc=%d\n",
				rc);

		return rc;
	}

	if (!(val & SNK_DAM_MASK)) {
		rc = smblib_masked_write(chg, TYPE_C_CFG_REG,
					BC1P2_START_ON_CC_BIT, 0);
		if (rc < 0) {
@@ -2174,6 +2183,7 @@ static int smb5_configure_typec(struct smb_charger *chg)

			return rc;
		}
	}

	/* Use simple write to clear interrupts */
	rc = smblib_write(chg, TYPE_C_INTERRUPT_EN_CFG_1_REG, 0);
+1 −0
Original line number Diff line number Diff line
@@ -335,6 +335,7 @@ enum {
 ********************************/
#define TYPE_C_SNK_STATUS_REG			(TYPEC_BASE + 0x06)
#define DETECTED_SRC_TYPE_MASK			GENMASK(6, 0)
#define SNK_DAM_MASK				GENMASK(6, 4)
#define SNK_DAM_500MA_BIT			BIT(6)
#define SNK_DAM_1500MA_BIT			BIT(5)
#define SNK_DAM_3000MA_BIT			BIT(4)