Skip to content

Commit 38663e4

Browse files
LeoCX-Tsaiquinchou77
authored andcommitted
fwk: isl9241: when back to NVDC mode set default acok reference
set the lower acok reference if charger is back to NVDC mode BRANCH=fwk-tulip-29169 BUG=https://app.clickup.com/t/86euzpakj TEST=can't hear the noise in standby mode Signed-off-by: LeoCX_Tsai <LeoCX_Tsai@compal.com>
1 parent 75388a1 commit 38663e4

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

driver/charger/isl9241.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,22 @@ static enum ec_error_list isl9241_bypass_to_nvdc(int chgnum)
10371037
return rv;
10381038

10391039
/* 12*: Set MaxSysVoltage to full charge. */
1040-
return isl9241_write(chgnum, ISL9241_REG_MAX_SYSTEM_VOLTAGE,
1040+
rv = isl9241_write(chgnum, ISL9241_REG_MAX_SYSTEM_VOLTAGE,
10411041
bi->voltage_max);
1042+
1043+
if (rv)
1044+
return rv;
1045+
1046+
#ifdef CONFIG_CUSTOMIZED_DESIGN
1047+
rv = isl9241_write(chgnum, ISL9241_REG_ACOK_REFERENCE,
1048+
ISL9241_MV_TO_ACOK_REFERENCE(4000));
1049+
#else
1050+
rv = isl9241_write(chgnum, ISL9241_REG_ACOK_REFERENCE,
1051+
ISL9241_MV_TO_ACOK_REFERENCE(
1052+
ISL9241_ACOK_REF_LOW_VOLTAGE_ADAPTER_MV));
1053+
#endif
1054+
1055+
return rv;
10421056
}
10431057

10441058
#ifdef CONFIG_CHARGER_BYPASS_REVERSE_TURBO

0 commit comments

Comments
 (0)