summaryrefslogtreecommitdiff
path: root/board/anahera
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2021-10-01 13:45:27 -0700
committerCommit Bot <commit-bot@chromium.org>2021-10-12 20:28:24 +0000
commitaf15326d86c6060aa5aaabb6d6a4ec3ae9e259bb (patch)
tree783c078ec98185d8f5c68a596fc7e9b976200ca9 /board/anahera
parent184021ee2aca6d13b30c1d5b75eea39789acef92 (diff)
downloadchrome-ec-af15326d86c6060aa5aaabb6d6a4ec3ae9e259bb.tar.gz
IOEX: Cleanup: Use IOEX_FLAGS_INITIALIZED flag to get the IOEX status
IOEX_FLAGS_DISABLED is replaced with IOEX_FLAGS_DEFAULT_INIT_DISABLED hence use IOEX_FLAGS_INITIALIZED flag to get the initialization status of the IOEXes. BUG=none BRANCH=none TEST=Tested on Brya. 'ioexget' command works and also default init function skips IOEX initialization. Change-Id: I98ff9643223c02388a2fa679b4631e3389fd466e Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3200063 Reviewed-by: Poornima Tom <poornima.tom@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/anahera')
-rw-r--r--board/anahera/usbc_config.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/board/anahera/usbc_config.c b/board/anahera/usbc_config.c
index 73a7b402cc..00b6589a46 100644
--- a/board/anahera/usbc_config.c
+++ b/board/anahera/usbc_config.c
@@ -134,13 +134,13 @@ struct ioexpander_config_t ioex_config[] = {
.i2c_host_port = I2C_PORT_USB_C0_TCPC,
.i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
- .flags = IOEX_FLAGS_DISABLED,
+ .flags = IOEX_FLAGS_DEFAULT_INIT_DISABLED,
},
[IOEX_C1_NCT38XX] = {
.i2c_host_port = I2C_PORT_USB_C1_TCPC,
.i2c_addr_flags = NCT38XX_I2C_ADDR1_4_FLAGS,
.drv = &nct38xx_ioexpander_drv,
- .flags = IOEX_FLAGS_DISABLED,
+ .flags = IOEX_FLAGS_DEFAULT_INIT_DISABLED,
},
};
BUILD_ASSERT(ARRAY_SIZE(ioex_config) == CONFIG_IO_EXPANDER_PORT_COUNT);
@@ -211,10 +211,8 @@ static void board_tcpc_init(void)
if (!system_jumped_late()) {
board_reset_pd_mcu();
- for (i = 0; i < CONFIG_IO_EXPANDER_PORT_COUNT; ++i) {
- ioex_config[i].flags &= ~IOEX_FLAGS_DISABLED;
+ for (i = 0; i < CONFIG_IO_EXPANDER_PORT_COUNT; ++i)
ioex_init(i);
- }
}
/* Enable PPC interrupts. */