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/octopus/baseboard.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'baseboard/octopus/baseboard.c') diff --git a/baseboard/octopus/baseboard.c b/baseboard/octopus/baseboard.c index f263f4a97e..cd9296cd19 100644 --- a/baseboard/octopus/baseboard.c +++ b/baseboard/octopus/baseboard.c @@ -11,6 +11,7 @@ #include "common.h" #include "console.h" #include "driver/bc12/max14637.h" +#include "driver/charger/isl923x.h" #include "driver/ppc/nx20p348x.h" #include "gpio.h" #include "hooks.h" @@ -77,6 +78,20 @@ const struct max14637_config_t max14637_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { }, }; +/******************************************************************************/ +/* Charger Chip Configuration */ +#ifdef VARIANT_OCTOPUS_CHARGER_ISL9238 +const struct charger_config_t chg_chips[] = { + { + .i2c_port = I2C_PORT_CHARGER, + .i2c_addr_flags = ISL923X_ADDR_FLAGS, + .drv = &isl923x_drv, + }, +}; + +const unsigned int chg_cnt = ARRAY_SIZE(chg_chips); +#endif + /******************************************************************************/ /* Chipset callbacks/hooks */ -- cgit v1.2.1