From d1a18f82ed831d4e640336ff5571f5fa64bc7b36 Mon Sep 17 00:00:00 2001 From: Denis Brockus Date: Tue, 25 Jun 2019 12:44:16 -0600 Subject: Use 7bit I2C/SPI slave addresses in EC Opt for 7bit slave addresses in EC code. If 8bit is expected by a driver, make it local and show this in the naming. Use __7b, __7bf and __8b as name extensions for i2c/spi addresses used in the EC codebase. __7b indicates a 7bit address by itself. __7bf indicates a 7bit address with optional flags attached. __8b indicates a 8bit address by itself. Allow space for 10bit addresses, even though this is not currently being used by any of our attached devices. These extensions are for verification purposes only and will be removed in the last pass of this ticket. I want to make sure the variable names reflect the type to help eliminate future 7/8/7-flags confusion. BUG=chromium:971296 BRANCH=none TEST=make buildall -j Change-Id: I2fc3d1b52ce76184492b2aaff3060f486ca45f45 Signed-off-by: Denis Brockus Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1699893 Reviewed-by: Jack Rosenthal --- driver/tcpm/mt6370.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'driver/tcpm/mt6370.c') diff --git a/driver/tcpm/mt6370.c b/driver/tcpm/mt6370.c index dc6c86d2c4..473e2a1881 100644 --- a/driver/tcpm/mt6370.c +++ b/driver/tcpm/mt6370.c @@ -22,8 +22,8 @@ /* i2c_write function which won't wake TCPC from low power mode. */ static int mt6370_i2c_write8(int port, int reg, int val) { - return i2c_write8(tcpc_config[port].i2c_info.port, - tcpc_config[port].i2c_info.addr, reg, val); + return i2c_write8__7bf(tcpc_config[port].i2c_info.port, + tcpc_config[port].i2c_info.addr__7bf, reg, val); } static int mt6370_init(int port) -- cgit v1.2.1