diff options
author | Diana Z <dzigterman@chromium.org> | 2020-11-03 14:02:21 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-05 01:28:33 +0000 |
commit | 23150c06baabe8db9796045036cb1f5a99e65647 (patch) | |
tree | 4c2e268e5be765dd9f1f618ae86e8e0f2892b26c /chip/max32660 | |
parent | 213dd9e5a9981a825393eb9b29d69dc0afb426ac (diff) | |
download | chrome-ec-23150c06baabe8db9796045036cb1f5a99e65647.tar.gz |
COIL: Rename CONFIG_BOARD_I2C_ADDR_FLAGS
Rename CONFIG_BOARD_I2C_ADDR_FLAGS and related comments.
BRANCH=None
BUG=None
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I45d4945b5c1fa26c72d233fb9def4d9bdee1c9c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518657
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'chip/max32660')
-rw-r--r-- | chip/max32660/i2c_chip.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/chip/max32660/i2c_chip.c b/chip/max32660/i2c_chip.c index 54638cb5de..f28e85f0ca 100644 --- a/chip/max32660/i2c_chip.c +++ b/chip/max32660/i2c_chip.c @@ -184,12 +184,12 @@ static mxc_i2c_regs_t *i2c_bus_ports[] = {MXC_I2C0, MXC_I2C1}; #ifdef CONFIG_HOSTCMD_I2C_ADDR_FLAGS -#ifdef CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS +#ifdef CONFIG_BOARD_I2C_ADDR_FLAGS static void i2c_send_board_response(int len); static void i2c_process_board_command(int read, int addr, int len); void board_i2c_process(int read, uint8_t addr, int len, char *buffer, void (*send_response)(int len)); -#endif /* CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS */ +#endif /* CONFIG_BOARD_I2C_ADDR_FLAGS */ #endif /* CONFIG_HOSTCMD_I2C_ADDR_FLAGS */ /** @@ -283,7 +283,7 @@ void i2c_init(void) #ifdef CONFIG_HOSTCMD_I2C_ADDR_FLAGS /* Initialize the I2C Slave */ init_i2cs(I2C_PORT_EC); -#ifdef CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS +#ifdef CONFIG_BOARD_I2C_ADDR_FLAGS /* * Set the secondary I2C slave address for the board. */ @@ -296,8 +296,8 @@ void i2c_init(void) /* Set the secondary slave address. */ i2c_bus_ports[I2C_PORT_EC]->slave_addr = (1 << MXC_F_I2C_SLAVE_ADDR_SLAVE_ADDR_IDX_POS) | - CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS; -#endif /* CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS */ + CONFIG_BOARD_I2C_ADDR_FLAGS; +#endif /* CONFIG_BOARD_I2C_ADDR_FLAGS */ #endif /* CONFIG_HOSTCMD_I2C_ADDR_FLAGS */ } @@ -394,13 +394,13 @@ void i2c_slave_service(i2c_req_t *req) /* A response to this write is pending. */ /* Assume that there is nothing to send back to the HOST. */ req->tx_remain = -1; -#ifdef CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS +#ifdef CONFIG_BOARD_I2C_ADDR_FLAGS if (req->addr_match_flag != 0x1) { i2c_process_board_command( - 0, CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS, + 0, CONFIG_BOARD_I2C_ADDR_FLAGS, req->received_count); } else -#endif /* CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS */ +#endif /* CONFIG_BOARD_I2C_ADDR_FLAGS */ { i2c_process_command(); } @@ -565,7 +565,7 @@ static void i2c_slave_handler(mxc_i2c_regs_t *i2c) /* Set the threshold for TX, the threshold is a four bit field. */ i2c->tx_ctrl0 = ((i2c->tx_ctrl0 & ~(MXC_F_I2C_TX_CTRL0_TX_THRESH)) | (2 << MXC_F_I2C_TX_CTRL0_TX_THRESH_POS)); -#ifdef CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS +#ifdef CONFIG_BOARD_I2C_ADDR_FLAGS /* * If this is a board address match and there is not * already a pending response to the I2C Master then @@ -574,9 +574,9 @@ static void i2c_slave_handler(mxc_i2c_regs_t *i2c) if ((req->response_pending == 0) && (req->addr_match_flag != 0x1)) { i2c_process_board_command( - 1, CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS, 0); + 1, CONFIG_BOARD_I2C_ADDR_FLAGS, 0); } -#endif /* CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS */ +#endif /* CONFIG_BOARD_I2C_ADDR_FLAGS */ } /* Only enable done, error and address match interrupts. */ i2c->int_en0 = MXC_F_I2C_INT_EN0_DONE | @@ -710,7 +710,7 @@ static int i2c_slave_async(mxc_i2c_regs_t *i2c, i2c_req_t *req) return EC_SUCCESS; } -#ifdef CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS +#ifdef CONFIG_BOARD_I2C_ADDR_FLAGS static void i2c_send_board_response(int len) { @@ -726,7 +726,7 @@ static void i2c_process_board_command(int read, int addr, int len) board_i2c_process(read, addr, len, &host_buffer[0], i2c_send_board_response); } -#endif /* CONFIG_BOARD_I2C_SLAVE_ADDR_FLAGS */ +#endif /* CONFIG_BOARD_I2C_ADDR_FLAGS */ #endif /* CONFIG_HOSTCMD_I2C_ADDR_FLAGS */ /** |