@@ -35,7 +35,7 @@ static void charger_chips_init(void)
3535 * after ADC
3636 */
3737
38- const int no_battery_current_limit_override_ma = 6000 ;
38+ const int no_battery_current_limit_override_ma = 3000 ;
3939 const struct battery_info * bi = battery_get_info ();
4040 uint16_t val = 0x0000 ; /*default ac setting */
4141 uint32_t data = 0 ;
@@ -59,6 +59,14 @@ static void charger_chips_init(void)
5959 ISL9241_CONTROL4_ACOK_BATGONE_DEBOUNCE_25US ))
6060 goto init_fail ;
6161
62+ /*
63+ * Set control3 register to
64+ * [14]: ACLIM Reload (Do not reload)
65+ */
66+ if (i2c_write16 (I2C_PORT_CHARGER , ISL9241_ADDR_FLAGS ,
67+ ISL9241_REG_CONTROL3 , ISL9241_CONTROL3_ACLIM_RELOAD ))
68+ goto init_fail ;
69+
6270 value = battery_is_charge_fet_disabled ();
6371 /* reverse the flag if no error */
6472 if (value != -1 )
@@ -103,14 +111,6 @@ static void charger_chips_init(void)
103111 ISL9241_CONTROL2_PROCHOT_DEBOUNCE_1000 ))
104112 goto init_fail ;
105113
106- /*
107- * Set control3 register to
108- * [14]: ACLIM Reload (Do not reload)
109- */
110- if (i2c_write16 (I2C_PORT_CHARGER , ISL9241_ADDR_FLAGS ,
111- ISL9241_REG_CONTROL3 , ISL9241_CONTROL3_ACLIM_RELOAD ))
112- goto init_fail ;
113-
114114 if (i2c_write16 (I2C_PORT_CHARGER , ISL9241_ADDR_FLAGS ,
115115 ISL9241_REG_CONTROL0 , 0x0000 ))
116116 goto init_fail ;
0 commit comments