Skip to content

Commit 0585207

Browse files
committed
Azalea: set the charger maximum voltage to 15400 when AC only
Signed-off-by: Josh-Tsai <josh_tsai@compal.com>
1 parent 2db4aa8 commit 0585207

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

zephyr/program/lotus/azalea/src/charger.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,15 @@ static void charger_chips_init(void)
9393
* Set the MaxSystemVoltage to battery maximum,
9494
* 0x00=disables switching charger states
9595
*/
96-
97-
if (i2c_write16(I2C_PORT_CHARGER, ISL9241_ADDR_FLAGS,
98-
ISL9241_REG_MAX_SYSTEM_VOLTAGE, 0x3C28))
99-
goto init_fail;
96+
if (value == -1) {
97+
if (i2c_write16(I2C_PORT_CHARGER, ISL9241_ADDR_FLAGS,
98+
ISL9241_REG_MAX_SYSTEM_VOLTAGE, 15400))
99+
goto init_fail;
100+
} else {
101+
if (i2c_write16(I2C_PORT_CHARGER, ISL9241_ADDR_FLAGS,
102+
ISL9241_REG_MAX_SYSTEM_VOLTAGE, bi->voltage_max))
103+
goto init_fail;
104+
}
100105

101106
/*
102107
* Set the MinSystemVoltage to battery minimum,

0 commit comments

Comments
 (0)