summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-08-20 16:36:38 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-09-05 07:19:59 +0000
commit93cb494a7e44864912843e63c04ae72912a1a2e4 (patch)
tree97399ed492eda3d72923bc1c6ceac977a2bf4061 /test
parent3f2eba22c5d3e771904f6451a4b63a41cc6964cb (diff)
downloadchrome-ec-93cb494a7e44864912843e63c04ae72912a1a2e4.tar.gz
Add BQ27541 battery driver
BQ27541 is not a smart battery IC, and thus we cannot use existing smart battery driver. Let's add a driver that implements a smart-battery-like interface. The 'battery' console command is also moved to battery.c so that it can be reused by different battery driver. BUG=chrome-os-partner:22048 TEST=Type 'battery' and check the reported values are sane. TEST=Check 'battery' command works fine on Spring. BRANCH=None Change-Id: I5d1eaeb3f801478f3b9473fd43c1f2a2eda75859 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/66340
Diffstat (limited to 'test')
-rw-r--r--test/test_config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_config.h b/test/test_config.h
index 21c4d64a57..0dd63b9dd8 100644
--- a/test/test_config.h
+++ b/test/test_config.h
@@ -15,10 +15,14 @@
#ifdef TEST_sbs_charging
#define CONFIG_BATTERY_MOCK
+#define CONFIG_BATTERY_SMART
#define CONFIG_CHARGER
#define CONFIG_CHARGER_INPUT_CURRENT 4032
#define CONFIG_CHARGER_DISCHARGE_ON_AC
int board_discharge_on_ac(int enabled);
+#define I2C_PORT_HOST 1
+#define I2C_PORT_BATTERY 1
+#define I2C_PORT_CHARGER 1
#endif
#ifdef TEST_adapter