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

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

Merge "qpnp-smb2: configure DRP mode after interrupt request"

parents fb8f2806 831a9547
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -1466,15 +1466,6 @@ static int smb2_configure_typec(struct smb_charger *chg)
		return rc;
	}

	/* configure power role for dual-role */
	rc = smblib_masked_write(chg, TYPE_C_INTRPT_ENB_SOFTWARE_CTRL_REG,
				 TYPEC_POWER_ROLE_CMD_MASK, 0);
	if (rc < 0) {
		dev_err(chg->dev,
			"Couldn't configure power role for DRP rc=%d\n", rc);
		return rc;
	}

	/*
	 * disable Type-C factory mode and stay in Attached.SRC state when VCONN
	 * over-current happens
@@ -1852,6 +1843,16 @@ static int smb2_init_hw(struct smb2 *chip)
static int smb2_post_init(struct smb2 *chip)
{
	struct smb_charger *chg = &chip->chg;
	int rc;

	/* configure power role for dual-role */
	rc = smblib_masked_write(chg, TYPE_C_INTRPT_ENB_SOFTWARE_CTRL_REG,
				 TYPEC_POWER_ROLE_CMD_MASK, 0);
	if (rc < 0) {
		dev_err(chg->dev,
			"Couldn't configure power role for DRP rc=%d\n", rc);
		return rc;
	}

	rerun_election(chg->usb_irq_enable_votable);

@@ -2419,7 +2420,11 @@ static int smb2_probe(struct platform_device *pdev)
		goto cleanup;
	}

	smb2_post_init(chip);
	rc = smb2_post_init(chip);
	if (rc < 0) {
		pr_err("Failed in post init rc=%d\n", rc);
		goto cleanup;
	}

	smb2_create_debugfs(chip);