diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-07-16 15:10:11 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-20 23:09:18 +0000 |
commit | 473bd883b60fd5b00377766dae2bacad246de0d2 (patch) | |
tree | 992d9f03104277934c22c869eceb634e2cf5f7ec /common/usb_i2c.c | |
parent | 053491b560d2c4e374bb739373d8ae25c41f6315 (diff) | |
download | chrome-ec-473bd883b60fd5b00377766dae2bacad246de0d2.tar.gz |
Remove __7b, __8b and __7bf
The extentions were added to make the compiler perform most
of the verification that the conversion was being done correctly
to remove 8bit addressing as the standard I2C/SPI address type.
Now that the compiler has verified the code, the extra
extentions are being removed
BUG=chromium:971296
BRANCH=none
TEST=make buildall -j
TEST=verify sensor functionality on arcada_ish
Change-Id: I36894f8bb9daefb5b31b5e91577708f6f9af2a4f
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704792
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common/usb_i2c.c')
-rw-r--r-- | common/usb_i2c.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/usb_i2c.c b/common/usb_i2c.c index 375419dfcc..ace2e7139c 100644 --- a/common/usb_i2c.c +++ b/common/usb_i2c.c @@ -106,7 +106,7 @@ static void usb_i2c_execute(struct usb_i2c_config const *config) /* Payload is ready to execute. */ uint32_t count = usb_i2c_read_packet(config); int portindex = (config->buffer[0] >> 0) & 0xf; - uint16_t addr__7bf = (config->buffer[0] >> 8) & 0x7f; + uint16_t addr_flags = (config->buffer[0] >> 8) & 0x7f; int write_count = ((config->buffer[0] << 4) & 0xf00) | ((config->buffer[1] >> 0) & 0xff); int read_count = (config->buffer[1] >> 8) & 0xff; @@ -133,7 +133,7 @@ static void usb_i2c_execute(struct usb_i2c_config const *config) config->buffer[0] = USB_I2C_READ_COUNT_INVALID; } else if (portindex >= i2c_ports_used) { config->buffer[0] = USB_I2C_PORT_INVALID; - } else if (addr__7bf == USB_I2C_CMD_ADDR__7bf) { + } else if (addr_flags == USB_I2C_CMD_ADDR_FLAGS) { /* * This is a non-i2c command, invoke the handler if it has * been registered, if not - report the appropriate error. @@ -154,11 +154,11 @@ static void usb_i2c_execute(struct usb_i2c_config const *config) * knows about. It should behave closer to * EC_CMD_I2C_PASSTHRU, which can protect ports and ranges. */ - ret = i2c_xfer__7bf(i2c_ports[portindex].port, addr__7bf, - (uint8_t *)(config->buffer + 2) + offset, - write_count, - (uint8_t *)(config->buffer + 2), - read_count); + ret = i2c_xfer(i2c_ports[portindex].port, addr_flags, + (uint8_t *)(config->buffer + 2) + offset, + write_count, + (uint8_t *)(config->buffer + 2), + read_count); config->buffer[0] = usb_i2c_map_error(ret); } usb_i2c_write_packet(config, read_count + 4); |