charging: config batt profile max fv

config batt profile max fv for FFC
function

Change-Id: I5f6200d7bc61525069de73b889dc727b0851449c
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2268183
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
mahj8 2022-05-13 15:49:37 +08:00 • committed by Haijian Ma
commit 65ea3cf178
2 changed files with 6 additions and 0 deletions

View file

@ -52,7 +52,12 @@ static int mmi_discrete_parse_dts(struct mmi_discrete_charger *chip)
struct device_node *node = chip->dev->of_node;
rc = of_property_read_u32(node,
"mmi,batt-profile-fv-mv", &chip->batt_profile_fv_uv);
if (rc < 0) {
rc = of_property_read_u32(node,
"mmi,max-fv-mv", &chip->batt_profile_fv_uv);
}
if (rc < 0)
chip->batt_profile_fv_uv = -EINVAL;
else

View file

@ -343,6 +343,7 @@ static int sgm4154x_set_chrg_volt(struct sgm4154x_device *sgm, int chrg_volt)
reg_val = (chrg_volt-SGM4154x_VREG_V_MIN_uV) / SGM4154x_VREG_V_STEP_uV;
switch(chrg_volt) {
case 4512000:
case 4480000:
case 4450000:
reg_val++;