diff options
author | Ting Shen <phoenixshen@chromium.org> | 2019-09-11 22:45:22 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-17 14:54:36 +0000 |
commit | c1edf25f4d3000529994be1ac1af166c69df47a3 (patch) | |
tree | b24e5a6e6f1ea77d8ff1663e1395a0acbcbac615 | |
parent | 5e333117e96fd78d48fc1be632c43e8bcb6d9df5 (diff) | |
download | chrome-ec-c1edf25f4d3000529994be1ac1af166c69df47a3.tar.gz |
kukui: remove virtual battery for devices with smart battery
CONFIG_I2C_VIRTUAL_BATTERY/CONFIG_I2C_PASSTHRU_RESTRICTED is for devices
with dumb battery to simulate smart battery interface. Remove these
flags for devices with smart battery.
BUG=b:140847169
TEST=ectool i2cread 8 1 0x16 <reg>, where reg = 0x00~0x03
BRANCH=master
Change-Id: I6088f66596e626f62320ee4ab181e972016aa80c
Signed-off-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1799289
Reviewed-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>
Tested-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
-rw-r--r-- | baseboard/kukui/baseboard.c | 2 | ||||
-rw-r--r-- | baseboard/kukui/baseboard.h | 7 | ||||
-rw-r--r-- | board/jacuzzi/board.h | 1 | ||||
-rw-r--r-- | board/kodama/board.h | 1 |
4 files changed, 7 insertions, 4 deletions
diff --git a/baseboard/kukui/baseboard.c b/baseboard/kukui/baseboard.c index 98c0348c9f..2882fe760f 100644 --- a/baseboard/kukui/baseboard.c +++ b/baseboard/kukui/baseboard.c @@ -112,7 +112,9 @@ int board_get_version(void) return version; } +#ifndef VARIANT_KUKUI_BATTERY_SMART int board_allow_i2c_passthru(int port) { return (port == I2C_PORT_VIRTUAL_BATTERY); } +#endif diff --git a/baseboard/kukui/baseboard.h b/baseboard/kukui/baseboard.h index f200c5bc52..d02ca8fc64 100644 --- a/baseboard/kukui/baseboard.h +++ b/baseboard/kukui/baseboard.h @@ -27,6 +27,11 @@ #error Must define a VARIANT_KUKUI_BATTERY #endif /* VARIANT_KUKUI_BATTERY */ +#ifndef VARIANT_KUKUI_BATTERY_SMART +#define CONFIG_I2C_VIRTUAL_BATTERY +#define CONFIG_I2C_PASSTHRU_RESTRICTED +#endif + /* * Variant charger defines, pick one: * VARIANT_KUKUI_CHARGER_MT6370 @@ -70,8 +75,6 @@ #undef CONFIG_HIBERNATE #define CONFIG_I2C #define CONFIG_I2C_MASTER -#define CONFIG_I2C_VIRTUAL_BATTERY -#define CONFIG_I2C_PASSTHRU_RESTRICTED #define CONFIG_LED_COMMON #define CONFIG_LOW_POWER_IDLE #define CONFIG_POWER_COMMON diff --git a/board/jacuzzi/board.h b/board/jacuzzi/board.h index dcede405f2..0cafbd6469 100644 --- a/board/jacuzzi/board.h +++ b/board/jacuzzi/board.h @@ -62,7 +62,6 @@ #define I2C_PORT_USB_MUX 0 #define I2C_PORT_CHARGER 1 #define I2C_PORT_BATTERY 1 -#define I2C_PORT_VIRTUAL_BATTERY 1 #define I2C_PORT_IO_EXPANDER_IT8801 1 /* Enable Accel over SPI */ diff --git a/board/kodama/board.h b/board/kodama/board.h index b32512c2b2..8ccb962edb 100644 --- a/board/kodama/board.h +++ b/board/kodama/board.h @@ -54,7 +54,6 @@ #define I2C_PORT_TCPC0 0 #define I2C_PORT_USB_MUX 0 #define I2C_PORT_BATTERY 1 -#define I2C_PORT_VIRTUAL_BATTERY I2C_PORT_BATTERY #define I2C_PORT_ACCEL 1 /* Define the host events which are allowed to wakeup AP in S3. */ |