From d6db0a0c88b80b8505a3c139e06a63203433e8ea Mon Sep 17 00:00:00 2001 From: Diana Z Date: Thu, 30 Jan 2020 15:30:06 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2031855 Reviewed-by: Aseda Aboagye Reviewed-by: Jett Rink --- baseboard/volteer/baseboard.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'baseboard/volteer/baseboard.c') diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c index 5206ba9cc3..5205406660 100644 --- a/baseboard/volteer/baseboard.c +++ b/baseboard/volteer/baseboard.c @@ -10,6 +10,7 @@ #include "charge_state.h" #include "cros_board_info.h" #include "driver/bc12/pi3usb9201.h" +#include "driver/charger/isl9241.h" #include "driver/ppc/sn5s330.h" #include "driver/ppc/syv682x.h" #include "driver/tcpm/ps8xxx.h" @@ -163,6 +164,19 @@ const struct i2c_port_t i2c_ports[] = { }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); +/******************************************************************************/ +/* Charger Chip Configuration */ +const struct charger_config_t chg_chips[] = { + { + .i2c_port = I2C_PORT_CHARGER, + .i2c_addr_flags = ISL9241_ADDR_FLAGS, + .drv = &isl9241_drv, + }, +}; + +const unsigned int chg_cnt = ARRAY_SIZE(chg_chips); + + /******************************************************************************/ /* PWM configuration */ const struct pwm_t pwm_channels[] = { -- cgit v1.2.1