summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/battery_link.c3
-rw-r--r--common/charge_state.c6
-rw-r--r--common/charger_bq24707a.c4
-rw-r--r--common/charger_bq24715.c4
-rw-r--r--common/charger_bq24725.c4
-rw-r--r--common/charger_bq24738.c4
6 files changed, 11 insertions, 14 deletions
diff --git a/common/battery_link.c b/common/battery_link.c
index 98cde6de46..c92f3dafd2 100644
--- a/common/battery_link.c
+++ b/common/battery_link.c
@@ -120,10 +120,7 @@ void battery_vendor_params(struct batt_params *batt)
limit_value(desired_current, current_limit[temp_range][volt_range]);
-#ifndef CONFIG_SLOW_PRECHARGE
/* If battery wants current, give it at least the precharge current */
if (*desired_current > 0 && *desired_current < info.precharge_current)
*desired_current = info.precharge_current;
-#endif /* CONFIG_SLOW_PRECHARGE */
-
}
diff --git a/common/charge_state.c b/common/charge_state.c
index 2d342c1764..95b366d6b6 100644
--- a/common/charge_state.c
+++ b/common/charge_state.c
@@ -280,9 +280,9 @@ static int state_common(struct power_state_context *ctx)
/* Apply battery pack vendor charging method */
battery_vendor_params(batt);
-#ifdef CONFIG_CHARGING_CURRENT_LIMIT
- if (batt->desired_current > CONFIG_CHARGING_CURRENT_LIMIT)
- batt->desired_current = CONFIG_CHARGING_CURRENT_LIMIT;
+#ifdef CONFIG_CHARGER_CURRENT_LIMIT
+ if (batt->desired_current > CONFIG_CHARGER_CURRENT_LIMIT)
+ batt->desired_current = CONFIG_CHARGER_CURRENT_LIMIT;
#endif
if (batt->desired_current > user_current_limit)
batt->desired_current = user_current_limit;
diff --git a/common/charger_bq24707a.c b/common/charger_bq24707a.c
index 35ca469ed1..9538318997 100644
--- a/common/charger_bq24707a.c
+++ b/common/charger_bq24707a.c
@@ -16,8 +16,8 @@
/* Sense resistor configurations and macros */
#define DEFAULT_SENSE_RESISTOR 10
-#define R_SNS CONFIG_BQ24707A_R_SNS
-#define R_AC CONFIG_BQ24707A_R_AC
+#define R_SNS CONFIG_CHARGER_SENSE_RESISTOR
+#define R_AC CONFIG_CHARGER_SENSE_RESISTOR_AC
#define REG_TO_CURRENT(REG, RS) ((REG) * DEFAULT_SENSE_RESISTOR / (RS))
#define CURRENT_TO_REG(CUR, RS) ((CUR) * (RS) / DEFAULT_SENSE_RESISTOR)
diff --git a/common/charger_bq24715.c b/common/charger_bq24715.c
index dcdf249fbf..66d178a4c3 100644
--- a/common/charger_bq24715.c
+++ b/common/charger_bq24715.c
@@ -14,8 +14,8 @@
/* Sense resistor configurations and macros */
#define DEFAULT_SENSE_RESISTOR 10
-#define R_SNS CONFIG_BQ24715_R_SNS
-#define R_AC CONFIG_BQ24715_R_AC
+#define R_SNS CONFIG_CHARGER_SENSE_RESISTOR
+#define R_AC CONFIG_CHARGER_SENSE_RESISTOR_AC
#define REG_TO_CURRENT(REG, RS) ((REG) * DEFAULT_SENSE_RESISTOR / (RS))
#define CURRENT_TO_REG(CUR, RS) ((CUR) * (RS) / DEFAULT_SENSE_RESISTOR)
diff --git a/common/charger_bq24725.c b/common/charger_bq24725.c
index a0d297a996..d69b3edf13 100644
--- a/common/charger_bq24725.c
+++ b/common/charger_bq24725.c
@@ -15,8 +15,8 @@
/* Sense resistor configurations and macros */
#define DEFAULT_SENSE_RESISTOR 10
-#define R_SNS CONFIG_BQ24725_R_SNS
-#define R_AC CONFIG_BQ24725_R_AC
+#define R_SNS CONFIG_CHARGER_SENSE_RESISTOR
+#define R_AC CONFIG_CHARGER_SENSE_RESISTOR_AC
#define REG_TO_CURRENT(REG, RS) ((REG) * DEFAULT_SENSE_RESISTOR / (RS))
#define CURRENT_TO_REG(CUR, RS) ((CUR) * (RS) / DEFAULT_SENSE_RESISTOR)
diff --git a/common/charger_bq24738.c b/common/charger_bq24738.c
index 7fc8501fce..eaea6495d9 100644
--- a/common/charger_bq24738.c
+++ b/common/charger_bq24738.c
@@ -15,8 +15,8 @@
/* Sense resistor configurations and macros */
#define DEFAULT_SENSE_RESISTOR 10
-#define R_SNS CONFIG_BQ24738_R_SNS
-#define R_AC CONFIG_BQ24738_R_AC
+#define R_SNS CONFIG_CHARGER_SENSE_RESISTOR
+#define R_AC CONFIG_CHARGER_SENSE_RESISTOR_AC
#define REG_TO_CURRENT(REG, RS) ((REG) * DEFAULT_SENSE_RESISTOR / (RS))
#define CURRENT_TO_REG(CUR, RS) ((CUR) * (RS) / DEFAULT_SENSE_RESISTOR)