diff options
author | Yuval Peress <peress@chromium.org> | 2020-10-30 13:16:22 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-02 19:15:23 +0000 |
commit | 13323e77ff91a85154cfa5f504ed4609fb8cbfc7 (patch) | |
tree | 81709bca853db34a2eeb18a691514d0ba1ece1f8 /chip/lm4 | |
parent | f0e84c2df23995c61f7690a47f30f259bcde940e (diff) | |
download | chrome-ec-13323e77ff91a85154cfa5f504ed4609fb8cbfc7.tar.gz |
Replace I2C_GET_ADDR with I2C_STRIP_FLAGS
The new I2C_STRIP_FLAGS macro was added to avoid conflict with
Zephyr's macro. This CL performs the migration to that new API.
BRANCH=none
BUG=b:172067439
TEST=make runtests -j and built for various boards: eve, volteer,
arcada_ish, atlas, hatch, kohaku, nocturne, samus, and scarlet
Change-Id: I0583b647435db96ec268f186252b367bdc4118a6
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511097
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/lm4')
-rw-r--r-- | chip/lm4/i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/lm4/i2c.c b/chip/lm4/i2c.c index b5a9e566d7..ac4456980d 100644 --- a/chip/lm4/i2c.c +++ b/chip/lm4/i2c.c @@ -193,7 +193,7 @@ int chip_i2c_xfer(const int port, const uint16_t slave_addr_flags, CPRINTS("I2C%d Addr:%02X bad status 0x%02x, SCL=%d, SDA=%d", port, - I2C_GET_ADDR(slave_addr_flags), + I2C_STRIP_FLAGS(slave_addr_flags), reg_mcs, i2c_get_line_levels(port) & I2C_LINE_SCL_HIGH, i2c_get_line_levels(port) & I2C_LINE_SDA_HIGH); @@ -219,7 +219,7 @@ int chip_i2c_xfer(const int port, const uint16_t slave_addr_flags, } /* Set slave address for transmit */ - LM4_I2C_MSA(port) = (I2C_GET_ADDR(slave_addr_flags) << 1) & 0xff; + LM4_I2C_MSA(port) = (I2C_STRIP_FLAGS(slave_addr_flags) << 1) & 0xff; /* Enable interrupts */ pd->task_waiting = task_get_current(); |