Loading drivers/power/supply/qcom/battery.c +2 −1 Original line number Diff line number Diff line Loading @@ -201,7 +201,8 @@ static int cp_get_parallel_mode(struct pl_data *chip, int mode) static int get_adapter_icl_based_ilim(struct pl_data *chip) { int main_icl, adapter_icl = -EINVAL, rc = -EINVAL, final_icl = -EINVAL; int main_icl = -EINVAL, adapter_icl = -EINVAL, final_icl = -EINVAL; int rc = -EINVAL; union power_supply_propval pval = {0, }; rc = power_supply_get_property(chip->usb_psy, Loading drivers/power/supply/qcom/smb1398-charger.c +25 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ #define MISC_CFG0_REG 0x2634 #define DIS_SYNC_DRV_BIT BIT(5) #define SW_EN_SWITCHER_BIT BIT(3) #define CFG_DIS_FPF_IREV_BIT BIT(1) #define MISC_CFG1_REG 0x2635 #define MISC_CFG1_MASK GENMASK(7, 0) Loading Loading @@ -1907,6 +1908,14 @@ static int smb1398_div2_cp_hw_init(struct smb1398_chip *chip) return rc; } /* Configure window (Vin/2 - Vout) UV level to 10mV */ rc = smb1398_masked_write(chip, NOLOCK_SPARE_REG, DIV2_WIN_UV_SEL_BIT, 0); if (rc < 0) { dev_err(chip->dev, "Couldn't set WIN_UV_10_MV rc=%d\n", rc); return rc; } /* Configure master TEMP pin to output Vtemp signal by default */ rc = smb1398_masked_write(chip, SSUPLY_TEMP_CTRL_REG, SEL_OUT_TEMP_MAX_MASK, SEL_OUT_VTEMP); Loading Loading @@ -1947,6 +1956,14 @@ static int smb1398_div2_cp_hw_init(struct smb1398_chip *chip) return rc; } /* Do not disable FP_FET during IREV conditions */ rc = smb1398_masked_write(chip, MISC_CFG0_REG, CFG_DIS_FPF_IREV_BIT, 0); if (rc < 0) { dev_err(chip->dev, "Couldn't set CFG_DIS_FPF_IREV_BIT, rc=%d\n", rc); return rc; } /* switcher enable controlled by register */ rc = smb1398_masked_write(chip, MISC_CFG0_REG, SW_EN_SWITCHER_BIT, SW_EN_SWITCHER_BIT); Loading Loading @@ -2232,6 +2249,14 @@ static int smb1398_div2_cp_slave_probe(struct smb1398_chip *chip) return rc; } /* Configure window (Vin/2 - Vout) UV level to 10mV */ rc = smb1398_masked_write(chip, NOLOCK_SPARE_REG, DIV2_WIN_UV_SEL_BIT, 0); if (rc < 0) { dev_err(chip->dev, "Couldn't set WIN_UV_10_MV rc=%d\n", rc); return rc; } /* * Disable slave WIN_UV detection, otherwise slave might not be * enabled due to WIN_UV until master drawing very high current. Loading Loading
drivers/power/supply/qcom/battery.c +2 −1 Original line number Diff line number Diff line Loading @@ -201,7 +201,8 @@ static int cp_get_parallel_mode(struct pl_data *chip, int mode) static int get_adapter_icl_based_ilim(struct pl_data *chip) { int main_icl, adapter_icl = -EINVAL, rc = -EINVAL, final_icl = -EINVAL; int main_icl = -EINVAL, adapter_icl = -EINVAL, final_icl = -EINVAL; int rc = -EINVAL; union power_supply_propval pval = {0, }; rc = power_supply_get_property(chip->usb_psy, Loading
drivers/power/supply/qcom/smb1398-charger.c +25 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ #define MISC_CFG0_REG 0x2634 #define DIS_SYNC_DRV_BIT BIT(5) #define SW_EN_SWITCHER_BIT BIT(3) #define CFG_DIS_FPF_IREV_BIT BIT(1) #define MISC_CFG1_REG 0x2635 #define MISC_CFG1_MASK GENMASK(7, 0) Loading Loading @@ -1907,6 +1908,14 @@ static int smb1398_div2_cp_hw_init(struct smb1398_chip *chip) return rc; } /* Configure window (Vin/2 - Vout) UV level to 10mV */ rc = smb1398_masked_write(chip, NOLOCK_SPARE_REG, DIV2_WIN_UV_SEL_BIT, 0); if (rc < 0) { dev_err(chip->dev, "Couldn't set WIN_UV_10_MV rc=%d\n", rc); return rc; } /* Configure master TEMP pin to output Vtemp signal by default */ rc = smb1398_masked_write(chip, SSUPLY_TEMP_CTRL_REG, SEL_OUT_TEMP_MAX_MASK, SEL_OUT_VTEMP); Loading Loading @@ -1947,6 +1956,14 @@ static int smb1398_div2_cp_hw_init(struct smb1398_chip *chip) return rc; } /* Do not disable FP_FET during IREV conditions */ rc = smb1398_masked_write(chip, MISC_CFG0_REG, CFG_DIS_FPF_IREV_BIT, 0); if (rc < 0) { dev_err(chip->dev, "Couldn't set CFG_DIS_FPF_IREV_BIT, rc=%d\n", rc); return rc; } /* switcher enable controlled by register */ rc = smb1398_masked_write(chip, MISC_CFG0_REG, SW_EN_SWITCHER_BIT, SW_EN_SWITCHER_BIT); Loading Loading @@ -2232,6 +2249,14 @@ static int smb1398_div2_cp_slave_probe(struct smb1398_chip *chip) return rc; } /* Configure window (Vin/2 - Vout) UV level to 10mV */ rc = smb1398_masked_write(chip, NOLOCK_SPARE_REG, DIV2_WIN_UV_SEL_BIT, 0); if (rc < 0) { dev_err(chip->dev, "Couldn't set WIN_UV_10_MV rc=%d\n", rc); return rc; } /* * Disable slave WIN_UV detection, otherwise slave might not be * enabled due to WIN_UV until master drawing very high current. Loading