18W charging set sgm4154x iindpm comp 100mA

Modify:
	18W charging set sgm4154x iindpm comp 100mA

Change-Id: I06cfb2e202cc0c84d7eda44abfe93ad2a42f8942
Signed-off-by: <hq114@motorola.com>
Reviewed-on: https://gerrit.mot.com/2375935
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
[A 2022-09-01 11:00:42 +08:00 • committed by hq114
commit 243b09b090
2 changed files with 5 additions and 0 deletions

View file

@ -761,6 +761,8 @@ static int sgm4154x_set_input_curr_lim(struct sgm4154x_device *sgm, int iindpm)
reg_val = (iindpm-SGM4154x_IINDPM_I_MIN_uA) / SGM4154x_IINDPM_STEP_uA;
else if (iindpm > 3100000 && iindpm < SGM4154x_IINDPM_I_MAX_uA)
reg_val = 0x1E;
if(sgm->sgm_18W_iindpm_comp && iindpm == 3000000)
reg_val = 0x1E;
#endif
ret = mmi_regmap_update_bits(sgm, SGM4154x_CHRG_CTRL_0,
@ -2604,6 +2606,8 @@ static int sgm4154x_parse_dt(struct sgm4154x_device *sgm)
gpio_direction_output(sgm->wls_en_gpio, 0);//default enable wls charge
}
/* 18W iindpm comp */
sgm->sgm_18W_iindpm_comp = of_property_read_bool(sgm->dev->of_node, "sgm,18w_iindpm_comp");
/* sw jeita */
sgm->enable_sw_jeita = of_property_read_bool(sgm->dev->of_node, "enable_sw_jeita");
/* enable dynamic adjust battery voltage */

View file

@ -386,6 +386,7 @@ struct sgm4154x_device {
int wls_max_icl;
bool i2c_err_wa_dis;
bool sgm_18W_iindpm_comp;
};
#ifdef CONFIG_MMI_QC3P_WT6670_DETECTED