Loading drivers/power/supply/qcom/qpnp-smb5.c +10 −1 Original line number Diff line number Diff line Loading @@ -1856,9 +1856,18 @@ static int smb5_configure_typec(struct smb_charger *chg) rc = smblib_masked_write(chg, USBIN_LOAD_CFG_REG, USBIN_IN_COLLAPSE_GF_SEL_MASK | USBIN_AICL_STEP_TIMING_SEL_MASK, 0); if (rc < 0) if (rc < 0) { dev_err(chg->dev, "Couldn't set USBIN_LOAD_CFG_REG rc=%d\n", rc); return rc; } /* Set CC threshold to 1.6 V in source mode */ rc = smblib_masked_write(chg, TYPE_C_EXIT_STATE_CFG_REG, SEL_SRC_UPPER_REF_BIT, SEL_SRC_UPPER_REF_BIT); if (rc < 0) dev_err(chg->dev, "Couldn't configure CC threshold voltage rc=%d\n", rc); return rc; } Loading drivers/power/supply/qcom/smb5-reg.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2018 The Linux Foundation. All rights reserved. /* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -394,6 +394,7 @@ enum { #define TYPE_C_EXIT_STATE_CFG_REG (TYPEC_BASE + 0x50) #define BYPASS_VSAFE0V_DURING_ROLE_SWAP_BIT BIT(3) #define SEL_SRC_UPPER_REF_BIT BIT(2) #define EXIT_SNK_BASED_ON_CC_BIT BIT(0) #define TYPE_C_CURRSRC_CFG_REG (TYPEC_BASE + 0x52) Loading Loading
drivers/power/supply/qcom/qpnp-smb5.c +10 −1 Original line number Diff line number Diff line Loading @@ -1856,9 +1856,18 @@ static int smb5_configure_typec(struct smb_charger *chg) rc = smblib_masked_write(chg, USBIN_LOAD_CFG_REG, USBIN_IN_COLLAPSE_GF_SEL_MASK | USBIN_AICL_STEP_TIMING_SEL_MASK, 0); if (rc < 0) if (rc < 0) { dev_err(chg->dev, "Couldn't set USBIN_LOAD_CFG_REG rc=%d\n", rc); return rc; } /* Set CC threshold to 1.6 V in source mode */ rc = smblib_masked_write(chg, TYPE_C_EXIT_STATE_CFG_REG, SEL_SRC_UPPER_REF_BIT, SEL_SRC_UPPER_REF_BIT); if (rc < 0) dev_err(chg->dev, "Couldn't configure CC threshold voltage rc=%d\n", rc); return rc; } Loading
drivers/power/supply/qcom/smb5-reg.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2018 The Linux Foundation. All rights reserved. /* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -394,6 +394,7 @@ enum { #define TYPE_C_EXIT_STATE_CFG_REG (TYPEC_BASE + 0x50) #define BYPASS_VSAFE0V_DURING_ROLE_SWAP_BIT BIT(3) #define SEL_SRC_UPPER_REF_BIT BIT(2) #define EXIT_SNK_BASED_ON_CC_BIT BIT(0) #define TYPE_C_CURRSRC_CFG_REG (TYPEC_BASE + 0x52) Loading