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

Commit f9136682 authored by Anirudh Ghayal's avatar Anirudh Ghayal
Browse files

power: qpnp-smblite: Update TYPEC configuration



Disable all the interrupts from EN_CFG_2 as they are
un-necessary and do not configure debug-accesory
in source mode.

Change-Id: Ic7e2ec54b483b925797a72270831808fcb2c8bc1
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent dc0641f6
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -960,22 +960,18 @@ static int smblite_configure_typec(struct smb_charger *chg)
		return rc;
	}

	rc = smblite_lib_masked_write(chg, TYPE_C_MODE_CFG_REG,
					EN_SNK_ONLY_BIT, 0);
	rc = smblite_lib_write(chg, TYPE_C_INTERRUPT_EN_CFG_2_REG, 0);
	if (rc < 0) {
		dev_err(chg->dev,
			"Couldn't configure TYPE_C_MODE_CFG_REG rc=%d\n",
				rc);
			"Couldn't configure Type-C interrupts rc=%d\n", rc);
		return rc;
	}

	/* Enable detection of unoriented debug accessory in source mode */
	rc = smblite_lib_masked_write(chg, DEBUG_ACCESS_SRC_CFG_REG,
				 EN_UNORIENTED_DEBUG_ACCESS_SRC_BIT,
				 EN_UNORIENTED_DEBUG_ACCESS_SRC_BIT);
	rc = smblite_lib_masked_write(chg, TYPE_C_MODE_CFG_REG,
					EN_SNK_ONLY_BIT, 0);
	if (rc < 0) {
		dev_err(chg->dev,
			"Couldn't configure TYPE_C_DEBUG_ACCESS_SRC_CFG_REG rc=%d\n",
			"Couldn't configure TYPE_C_MODE_CFG_REG rc=%d\n",
				rc);
		return rc;
	}