summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRong Chang <rongchang@chromium.org>2012-07-12 14:13:39 +0800
committerGerrit <chrome-bot@google.com>2012-07-12 02:09:45 -0700
commit54d14bf3fac5237e8c3b059c7019d6c7f88ee168 (patch)
tree881d459a9445d05cf9ba2ab058bf3df48a3b75d5
parent740ba3f576ffbf0e29a3db8faf33d1b936d567d4 (diff)
downloadchrome-ec-54d14bf3fac5237e8c3b059c7019d6c7f88ee168.tar.gz
Rename battery pack file and limit trickle charging current
The spec of link internal battery pack changed. This CL adds parameter for new pack, and renames vendor specific source file accordingly. The new trickle charging current limit should fix the slow pre-charging issue. Signed-off-by: Rong Chang <rongchang@chromium.org> BUG=chrome-os-partner:11298,10201 TEST=manual The minimum trickle charging current should be very close to 0.01 C (85mA). Previous battery pack firmware uses 5mA in pre- charging. Change-Id: I0bad679db7dd087894297e6eb0e85c9b12fdf444 Reviewed-on: https://gerrit.chromium.org/gerrit/27256 Reviewed-by: Vic Yang <victoryang@chromium.org> Commit-Ready: Rong Chang <rongchang@chromium.org> Tested-by: Rong Chang <rongchang@chromium.org>
-rw-r--r--board/link/board.h2
-rw-r--r--common/battery_link.c (renamed from common/battery_atl706486.c)9
-rw-r--r--common/build.mk2
3 files changed, 10 insertions, 3 deletions
diff --git a/board/link/board.h b/board/link/board.h
index d6911f86bd..eeb091b046 100644
--- a/board/link/board.h
+++ b/board/link/board.h
@@ -15,7 +15,7 @@
/* Optional features */
#define CONFIG_SMART_BATTERY
-#define CONFIG_BATTERY_ATL706486
+#define CONFIG_BATTERY_LINK
#define CONFIG_CHARGER
#define CONFIG_CHARGER_BQ24725
#define CONFIG_CONSOLE_CMDHELP
diff --git a/common/battery_atl706486.c b/common/battery_link.c
index 29ef5b6c91..74e7944684 100644
--- a/common/battery_atl706486.c
+++ b/common/battery_link.c
@@ -2,7 +2,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
- * Battery pack vendor provided charging profile for ATL706486
+ * Battery pack vendor provided charging profile
*/
#include "battery_pack.h"
@@ -114,6 +114,13 @@ void battery_vendor_params(struct batt_params *batt)
else
limit_value(desired_current, C_02);
}
+
+#ifndef CONFIG_SLOW_PRECHARGE
+ /* Trickle charging and pre-charging current should be 0.01 C */
+ if (*desired_current < info.precharge_current)
+ *desired_current = info.precharge_current;
+#endif /* CONFIG_SLOW_PRECHARGE */
+
}
diff --git a/common/build.mk b/common/build.mk
index b417d39bff..bfdeb11058 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -9,7 +9,7 @@
common-y=main.o util.o console_output.o uart_buffering.o
common-y+=memory_commands.o shared_mem.o system_common.o hooks.o
common-y+=gpio_commands.o version.o printf.o queue.o
-common-$(CONFIG_BATTERY_ATL706486)+=battery_atl706486.o
+common-$(CONFIG_BATTERY_LINK)+=battery_link.o
common-$(CONFIG_CHARGER_BQ24725)+=charger_bq24725.o
common-$(CONFIG_PMU_TPS65090)+=pmu_tps65090.o pmu_tps65090_charger.o
common-$(CONFIG_EOPTION)+=eoption.o