summaryrefslogtreecommitdiff
path: root/board/samus
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-01-30 15:30:06 -0700
committerCommit Bot <commit-bot@chromium.org>2020-02-04 22:10:57 +0000
commitd6db0a0c88b80b8505a3c139e06a63203433e8ea (patch)
tree24a3b7ab4ee8ef618328feb929c31bf26608108c /board/samus
parentccc649887ba991c82a338359c0e415e7e2d0698e (diff)
downloadchrome-ec-d6db0a0c88b80b8505a3c139e06a63203433e8ea.tar.gz
Charger: Convert boards to use new driver structure
This commit removes the temporary common charger chip configuration and instead puts the configuration in each board. BRANCH=none BUG=b:147672225 TEST=builds, runs on waddledoo and octopus Change-Id: If81aef31e48c65999a87e202494f286716114bbb Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2031855 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/samus')
-rw-r--r--board/samus/board.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/samus/board.c b/board/samus/board.c
index cb77dee2f9..2ed4616c9f 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -18,6 +18,7 @@
#include "driver/accel_kxcj9.h"
#include "driver/accelgyro_lsm6ds0.h"
#include "driver/als_isl29035.h"
+#include "driver/charger/bq24773.h"
#include "driver/temp_sensor/tmp006.h"
#include "extpower.h"
#include "fan.h"
@@ -132,6 +133,16 @@ const struct i2c_port_t i2c_ports[] = {
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
+/* Charger chips */
+const struct charger_config_t chg_chips[] = {
+ {
+ .i2c_port = I2C_PORT_CHARGER,
+ .i2c_addr_flags = I2C_ADDR_CHARGER_FLAGS,
+ .drv = &bq2477x_drv,
+ },
+};
+const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
+
#define TEMP_U40_REG_ADDR_FLAGS (0x40 | I2C_FLAG_BIG_ENDIAN)
#define TEMP_U41_REG_ADDR_FLAGS (0x44 | I2C_FLAG_BIG_ENDIAN)
#define TEMP_U42_REG_ADDR_FLAGS (0x41 | I2C_FLAG_BIG_ENDIAN)