summaryrefslogtreecommitdiff
path: root/driver/charger/isl923x.c
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2019-07-16 15:10:11 -0600
committerCommit Bot <commit-bot@chromium.org>2019-07-20 23:09:18 +0000
commit473bd883b60fd5b00377766dae2bacad246de0d2 (patch)
tree992d9f03104277934c22c869eceb634e2cf5f7ec /driver/charger/isl923x.c
parent053491b560d2c4e374bb739373d8ae25c41f6315 (diff)
downloadchrome-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 'driver/charger/isl923x.c')
-rw-r--r--driver/charger/isl923x.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c
index a2d6e08977..f2bd51b927 100644
--- a/driver/charger/isl923x.c
+++ b/driver/charger/isl923x.c
@@ -56,19 +56,19 @@ static const struct charger_info isl9237_charger_info = {
static inline int raw_read8(int offset, int *value)
{
- return i2c_read8__7bf(I2C_PORT_CHARGER, I2C_ADDR_CHARGER__7bf,
+ return i2c_read8(I2C_PORT_CHARGER, I2C_ADDR_CHARGER_FLAGS,
offset, value);
}
static inline int raw_read16(int offset, int *value)
{
- return i2c_read16__7bf(I2C_PORT_CHARGER, I2C_ADDR_CHARGER__7bf,
+ return i2c_read16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER_FLAGS,
offset, value);
}
static inline int raw_write16(int offset, int value)
{
- return i2c_write16__7bf(I2C_PORT_CHARGER, I2C_ADDR_CHARGER__7bf,
+ return i2c_write16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER_FLAGS,
offset, value);
}
@@ -575,7 +575,7 @@ static int print_amon_bmon(enum amon_bmon amon, int direction,
int adc, curr, reg, ret;
#ifdef CONFIG_CHARGER_ISL9238
- ret = i2c_read16__7bf(I2C_PORT_CHARGER, I2C_ADDR_CHARGER__7bf,
+ ret = i2c_read16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER_FLAGS,
ISL9238_REG_CONTROL3, &reg);
if (ret)
return ret;
@@ -585,7 +585,7 @@ static int print_amon_bmon(enum amon_bmon amon, int direction,
reg |= ISL9238_C3_AMON_BMON_DIRECTION;
else
reg &= ~ISL9238_C3_AMON_BMON_DIRECTION;
- ret = i2c_write16__7bf(I2C_PORT_CHARGER, I2C_ADDR_CHARGER__7bf,
+ ret = i2c_write16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER_FLAGS,
ISL9238_REG_CONTROL3, reg);
if (ret)
return ret;
@@ -593,7 +593,7 @@ static int print_amon_bmon(enum amon_bmon amon, int direction,
mutex_lock(&control1_mutex);
- ret = i2c_read16__7bf(I2C_PORT_CHARGER, I2C_ADDR_CHARGER__7bf,
+ ret = i2c_read16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER_FLAGS,
ISL923X_REG_CONTROL1, &reg);
if (!ret) {
/* Switch between AMON/BMON */
@@ -604,7 +604,7 @@ static int print_amon_bmon(enum amon_bmon amon, int direction,
/* Enable monitor */
reg &= ~ISL923X_C1_DISABLE_MON;
- ret = i2c_write16__7bf(I2C_PORT_CHARGER, I2C_ADDR_CHARGER__7bf,
+ ret = i2c_write16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER_FLAGS,
ISL923X_REG_CONTROL1, reg);
}
@@ -689,7 +689,7 @@ static void dump_reg_range(int low, int high)
for (reg = low; reg <= high; reg++) {
CPRINTF("[%Xh] = ", reg);
- rv = i2c_read16__7bf(I2C_PORT_CHARGER, I2C_ADDR_CHARGER__7bf,
+ rv = i2c_read16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER_FLAGS,
reg, &regval);
if (!rv)
CPRINTF("0x%04x\n", regval);