summaryrefslogtreecommitdiff
path: root/include/usb_pd_tcpc.h
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2020-10-30 13:16:22 -0600
committerCommit Bot <commit-bot@chromium.org>2020-11-02 19:15:23 +0000
commit13323e77ff91a85154cfa5f504ed4609fb8cbfc7 (patch)
tree81709bca853db34a2eeb18a691514d0ba1ece1f8 /include/usb_pd_tcpc.h
parentf0e84c2df23995c61f7690a47f30f259bcde940e (diff)
downloadchrome-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 'include/usb_pd_tcpc.h')
-rw-r--r--include/usb_pd_tcpc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/usb_pd_tcpc.h b/include/usb_pd_tcpc.h
index e1e185d4d0..384e30bd21 100644
--- a/include/usb_pd_tcpc.h
+++ b/include/usb_pd_tcpc.h
@@ -19,10 +19,10 @@
#ifdef TCPCI_I2C_PERIPHERAL
/* Convert TCPC address to type-C port number */
#define TCPC_ADDR_TO_PORT(addr) ((addr) \
- - I2C_GET_ADDR(CONFIG_TCPC_I2C_BASE_ADDR_FLAGS))
+ - I2C_STRIP_FLAGS(CONFIG_TCPC_I2C_BASE_ADDR_FLAGS))
/* Check if the i2c address belongs to TCPC */
#define ADDR_IS_TCPC(addr) (((addr) & 0x7E) \
- == I2C_GET_ADDR(CONFIG_TCPC_I2C_BASE_ADDR_FLAGS))
+ == I2C_STRIP_FLAGS(CONFIG_TCPC_I2C_BASE_ADDR_FLAGS))
#endif
/**