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/lb_common.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/lb_common.c')
-rw-r--r-- | common/lb_common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/lb_common.c b/common/lb_common.c index 1e37245558..93f01389b4 100644 --- a/common/lb_common.c +++ b/common/lb_common.c @@ -111,7 +111,7 @@ /* Since there's absolutely nothing we can do about it if an I2C access * isn't working, we're completely ignoring any failures. */ -static const uint16_t i2c_addr__7bf[] = { 0x2A, 0x2B }; +static const uint16_t i2c_addr_flags[] = { 0x2A, 0x2B }; static inline void controller_write(int ctrl_num, uint8_t reg, uint8_t val) { @@ -119,8 +119,8 @@ static inline void controller_write(int ctrl_num, uint8_t reg, uint8_t val) buf[0] = reg; buf[1] = val; - ctrl_num = ctrl_num % ARRAY_SIZE(i2c_addr__7bf); - i2c_xfer_unlocked__7bf(I2C_PORT_LIGHTBAR, i2c_addr__7bf[ctrl_num], + ctrl_num = ctrl_num % ARRAY_SIZE(i2c_addr_flags); + i2c_xfer_unlocked(I2C_PORT_LIGHTBAR, i2c_addr_flags[ctrl_num], buf, 2, 0, 0, I2C_XFER_SINGLE); } @@ -130,8 +130,8 @@ static inline uint8_t controller_read(int ctrl_num, uint8_t reg) uint8_t buf[1]; int rv; - ctrl_num = ctrl_num % ARRAY_SIZE(i2c_addr__7bf); - rv = i2c_xfer_unlocked__7bf(I2C_PORT_LIGHTBAR, i2c_addr__7bf[ctrl_num], + ctrl_num = ctrl_num % ARRAY_SIZE(i2c_addr_flags); + rv = i2c_xfer_unlocked(I2C_PORT_LIGHTBAR, i2c_addr_flags[ctrl_num], ®, 1, buf, 1, I2C_XFER_SINGLE); return rv ? 0 : buf[0]; } |