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

Commit bc374d57 authored by Fairphone ODM's avatar Fairphone ODM Committed by Rohit Sekhar
Browse files

power/supply: FP4 charger adapter output current 2A

 &&&%%%comment:[FP4] FP4 charger adapter output current 2A
 &&&%%%bug number:11296285
 &&&%%%product name:sm7225_r_fp4
 &&&%%%root cause:Specification
 &&&%%%Bug category:T2M
 &&&%%%Module_Impact:kernel
 &&&%%%Test_Suggestion:the FP4 charger adapter output current should be set less 2A
 &&&%%%Solution:set usb icl to 1.8A
 &&&%%%Test_Report:test is ok
 &&&%%%VAL Can Test:NO
parent bd292a42
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1555,6 +1555,14 @@ static void pl_disable_forever_work(struct work_struct *work)
		vote(chip->hvdcp_hw_inov_dis_votable, PL_VOTER, false, 0);
}


#define QC3_ICL_MAX	2000000
#define QC3_ICL_FP4_CP_MAX	2000000
#define QC3_ICL_FP4_CP_MAX_LCD_ON	1600000
#if defined(CONFIG_TCT_PM7250_COMMON)
extern bool g_lcd_on;
#endif

static int pl_disable_vote_callback(struct votable *votable,
		void *data, int pl_disable, const char *client)
{
@@ -1760,6 +1768,17 @@ static int pl_disable_vote_callback(struct votable *votable,
//#if defined(CONFIG_TCT_PM7250_COMMON) && !defined(CONFIG_TCT_OTTAWA_CHG_PATCH)
#if defined(CONFIG_TCT_PM7250_COMMON)
			cp_ilim = total_fcc_ua;
			rc = power_supply_get_property(chip->usb_psy,POWER_SUPPLY_PROP_PD_ACTIVE, &pval);
			if (rc < 0)
				pr_err("%s,Failed to read PD_ACTIVE status rc=%d\n",__func__,rc);
			/*zxzadd for fp4 hvdcp usb icl should be less than 2A*/

			if((pval.intval == POWER_SUPPLY_PD_INACTIVE)&&(cp_ilim>(QC3_ICL_MAX*2))){
				if(g_lcd_on)
					cp_ilim =QC3_ICL_FP4_CP_MAX_LCD_ON*2;
				else
					cp_ilim=QC3_ICL_FP4_CP_MAX*2;
			}
#else
			cp_ilim = total_fcc_ua - get_effective_result_locked(
							chip->fcc_main_votable);
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ module_param_named(
#endif

#if defined(CONFIG_TCT_PM7250_COMMON)
static int force_icl = 800000;
static int force_icl = 400000;
module_param_named(
	force_icl, force_icl,
	int, S_IRUSR | S_IWUSR