From 13323e77ff91a85154cfa5f504ed4609fb8cbfc7 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Fri, 30 Oct 2020 13:16:22 -0600 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511097 Reviewed-by: Jett Rink Reviewed-by: Jack Rosenthal Commit-Queue: Jett Rink --- chip/mec1322/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chip/mec1322') diff --git a/chip/mec1322/i2c.c b/chip/mec1322/i2c.c index 69344d8390..33b6c6242c 100644 --- a/chip/mec1322/i2c.c +++ b/chip/mec1322/i2c.c @@ -287,7 +287,7 @@ int chip_i2c_xfer(const int port, if (out_size) { if (send_start) { MEC1322_I2C_DATA(controller) = - (uint8_t)(I2C_GET_ADDR(slave_addr_flags) + (uint8_t)(I2C_STRIP_FLAGS(slave_addr_flags) << 1); /* Clock out the slave address, sending START bit */ @@ -332,7 +332,7 @@ int chip_i2c_xfer(const int port, CTRL_ENI; MEC1322_I2C_DATA(controller) = - (uint8_t)(I2C_GET_ADDR(slave_addr_flags) + (uint8_t)(I2C_STRIP_FLAGS(slave_addr_flags) << 1) | 0x01; -- cgit v1.2.1