Loading drivers/power/supply/qcom/qpnp-smb2.c +15 −10 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading
drivers/power/supply/qcom/qpnp-smb2.c +15 −10 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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); Loading Loading @@ -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); Loading