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 /board/plankton | |
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 'board/plankton')
-rw-r--r-- | board/plankton/board.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/board/plankton/board.c b/board/plankton/board.c index 886e8776ef..dbb3ff62b2 100644 --- a/board/plankton/board.c +++ b/board/plankton/board.c @@ -467,7 +467,7 @@ const struct i2c_port_t i2c_ports[] = { const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); /* 8-bit address */ -#define SN75DP130_I2C_ADDR__7bf 0x2e +#define SN75DP130_I2C_ADDR_FLAGS 0x2e /* * Pin number for active-high reset from PCA9534 to CMOS pull-down to * SN75DP130's RSTN (active-low) @@ -476,7 +476,7 @@ const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); static int sn75dp130_i2c_write(uint8_t index, uint8_t value) { - return i2c_write8__7bf(I2C_PORT_MASTER, SN75DP130_I2C_ADDR__7bf, + return i2c_write8(I2C_PORT_MASTER, SN75DP130_I2C_ADDR_FLAGS, index, value); } @@ -490,16 +490,16 @@ static int sn75dp130_reset(void) { int rv; - rv = pca9534_config_pin__7bf(I2C_PORT_MASTER, 0x20, + rv = pca9534_config_pin(I2C_PORT_MASTER, 0x20, REDRIVER_RST_PIN, PCA9534_OUTPUT); /* Assert (its active high) */ - rv |= pca9534_set_level__7bf(I2C_PORT_MASTER, 0x20, + rv |= pca9534_set_level(I2C_PORT_MASTER, 0x20, REDRIVER_RST_PIN, 1); /* datasheet recommends > 100usec */ usleep(200); /* De-assert */ - rv |= pca9534_set_level__7bf(I2C_PORT_MASTER, 0x20, + rv |= pca9534_set_level(I2C_PORT_MASTER, 0x20, REDRIVER_RST_PIN, 0); /* datasheet recommends > 400msec */ usleep(450 * MSEC); @@ -596,11 +596,11 @@ int board_in_hub_mode(void) int ret; int level; - ret = pca9534_config_pin__7bf(I2C_PORT_MASTER, 0x20, + ret = pca9534_config_pin(I2C_PORT_MASTER, 0x20, 6, PCA9534_INPUT); if (ret) return -1; - ret = pca9534_get_level__7bf(I2C_PORT_MASTER, 0x20, + ret = pca9534_get_level(I2C_PORT_MASTER, 0x20, 6, &level); if (ret) return -1; @@ -611,16 +611,16 @@ static int board_usb_hub_reset(void) { int ret; - ret = pca9534_config_pin__7bf(I2C_PORT_MASTER, 0x20, + ret = pca9534_config_pin(I2C_PORT_MASTER, 0x20, 7, PCA9534_OUTPUT); if (ret) return ret; - ret = pca9534_set_level__7bf(I2C_PORT_MASTER, 0x20, + ret = pca9534_set_level(I2C_PORT_MASTER, 0x20, 7, 0); if (ret) return ret; usleep(100 * MSEC); - return pca9534_set_level__7bf(I2C_PORT_MASTER, 0x20, + return pca9534_set_level(I2C_PORT_MASTER, 0x20, 7, 1); } |