summaryrefslogtreecommitdiff
path: root/driver/charger/bd9995x.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/charger/bd9995x.c')
-rw-r--r--driver/charger/bd9995x.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/driver/charger/bd9995x.c b/driver/charger/bd9995x.c
index f8e426fdc3..aa37bf4e8a 100644
--- a/driver/charger/bd9995x.c
+++ b/driver/charger/bd9995x.c
@@ -18,9 +18,9 @@
#include "panic.h"
#include "task.h"
#include "time.h"
+#include "util.h"
#include "usb_charge.h"
#include "usb_pd.h"
-#include "util.h"
#define OTPROM_LOAD_WAIT_RETRY 3
@@ -904,8 +904,7 @@ static void bd9995x_battery_charging_profile_settings(int chgnum)
const struct battery_info *bi = battery_get_info();
/* Input Current Limit Setting */
- bd9995x_set_input_current_limit(chgnum,
- CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT);
+ bd9995x_set_input_current_limit(chgnum, CONFIG_CHARGER_INPUT_CURRENT);
/* Charge Termination Current Setting */
ch_raw_write16(chgnum, BD9995X_CMD_ITERM_SET, 0,
@@ -1005,10 +1004,10 @@ static void bd9995x_init(void)
* Disable the input current limit when VBAT is < VSYSREG_SET. This
* needs to be done before calling
* bd9995x_battery_charging_profile_settings() as in that function the
- * input current limit is set to CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT
- * which is 512 mA. In deeply discharged battery cases, setting the
- * input current limit this low can cause VSYS to collapse, which in
- * turn can cause the EC's brownout detector to reset the EC.
+ * input current limit is set to CONFIG_CHARGER_INPUT_CURRENT which is
+ * 512 mA. In deeply discharged battery cases, setting the input current
+ * limit this low can cause VSYS to collapse, which in turn can cause
+ * the EC's brownout detector to reset the EC.
*/
if (ch_raw_read16(CHARGER_SOLO, BD9995X_CMD_VIN_CTRL_SET, &reg,
BD9995X_EXTENDED_COMMAND))