summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/charger/isl9241.c12
-rw-r--r--driver/charger/isl9241.h5
2 files changed, 11 insertions, 6 deletions
diff --git a/driver/charger/isl9241.c b/driver/charger/isl9241.c
index 45073e1897..4fbb137871 100644
--- a/driver/charger/isl9241.c
+++ b/driver/charger/isl9241.c
@@ -54,12 +54,12 @@ static const struct charger_info isl9241_charger_info = {
.voltage_max = CHARGE_V_MAX,
.voltage_min = CHARGE_V_MIN,
.voltage_step = CHARGE_V_STEP,
- .current_max = CHARGE_I_MAX,
- .current_min = CHARGE_I_MIN,
- .current_step = CHARGE_I_STEP,
- .input_current_max = INPUT_I_MAX,
- .input_current_min = INPUT_I_MIN,
- .input_current_step = INPUT_I_STEP,
+ .current_max = BC_REG_TO_CURRENT(CHARGE_I_MAX),
+ .current_min = BC_REG_TO_CURRENT(CHARGE_I_MIN),
+ .current_step = BC_REG_TO_CURRENT(CHARGE_I_STEP),
+ .input_current_max = AC_REG_TO_CURRENT(INPUT_I_MAX),
+ .input_current_min = AC_REG_TO_CURRENT(INPUT_I_MIN),
+ .input_current_step = AC_REG_TO_CURRENT(INPUT_I_STEP),
};
static enum ec_error_list isl9241_discharge_on_ac(int chgnum, int enable);
diff --git a/driver/charger/isl9241.h b/driver/charger/isl9241.h
index 0e5acd09df..186f41c6e2 100644
--- a/driver/charger/isl9241.h
+++ b/driver/charger/isl9241.h
@@ -14,6 +14,11 @@
#define CHARGE_V_MAX 18304
#define CHARGE_V_MIN 64
#define CHARGE_V_STEP 8
+/*
+ * When the default sense resistor value is used, register values
+ * represent mA. For other sense resistors values, register
+ * values must be scaled accordingly to convert to mA.
+ */
#define CHARGE_I_MAX 6140
#define CHARGE_I_MIN 4
#define CHARGE_I_STEP 4