Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 2f890dfd authored by zhangxianzhu's avatar zhangxianzhu Committed by Michael Bestas
Browse files

[ALM:11226831] [FP4] [charging]Can’t charge the phone when connected to the computer[11226831]

 &&&%%%comment:[FP4] Can’t charge the phone when connected to the computer
 &&&%%%bug number:11226831
 &&&%%%product name:sm7225_r_fp4
 &&&%%%root cause:Specification
 &&&%%%Bug category:T2M
 &&&%%%Module_Impact:kernel
 &&&%%%Test_Suggestion:test charging
 &&&%%%Solution:init fcc when booting
 &&&%%%Test_Report:test is ok
 &&&%%%VAL Can Test:NO

Change-Id: I3787d268117a699941d6fdc8924a05b473697310
parent 303c4eda
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2972,9 +2972,19 @@ static int smb5_init_hw(struct smb5 *chip)
			pr_err("Couldn't clear SDAM ADC status rc=%d\n", rc);
	}


/* zxz add for connect usb boot up, but the charge current is very low (is a negative value) ,
the reason is because of the "proper_fcc"=0; in smb5_usb_main_set_prop 'POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX' ,
batt_profile_fcc_ua =0 when boot up .
*/
	if (chip->dt.batt_profile_fcc_ua < 0)
		smblib_get_charge_param(chg, &chg->param.fcc,
				&chg->batt_profile_fcc_ua);
	else{
		if((chg->batt_profile_fcc_ua<0)||(chg->batt_profile_fcc_ua==0))
			chg->batt_profile_fcc_ua= chip->dt.batt_profile_fcc_ua;
		}


#if defined(CONFIG_TCT_PM7250_COMMON)
	chg->batt_profile_fv_uv = 4400000;