diff options
Diffstat (limited to 'driver')
-rw-r--r-- | driver/charger/bd9995x.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/driver/charger/bd9995x.c b/driver/charger/bd9995x.c index af8b0cc082..d74e0cd635 100644 --- a/driver/charger/bd9995x.c +++ b/driver/charger/bd9995x.c @@ -798,6 +798,16 @@ static void bd9995x_init(void) ch_raw_write16(BD9995X_CMD_CHGOP_SET2, reg, BD9995X_EXTENDED_COMMAND); + /* + * We disable IADP (here before setting IBUS_LIM_SET and ICC_LIM_SET) + * to prevent voltage on IADP/RESET pin from affecting SEL_ILIM_VAL. + */ + if (ch_raw_read16(BD9995X_CMD_VM_CTRL_SET, ®, + BD9995X_EXTENDED_COMMAND)) + return; + reg &= ~BD9995X_CMD_VM_CTRL_SET_EXTIADPEN; + ch_raw_write16(BD9995X_CMD_VM_CTRL_SET, reg, BD9995X_EXTENDED_COMMAND); + /* Define battery charging profile */ bd9995x_battery_charging_profile_settings(); |