summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-02-16 10:45:57 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-24 19:09:44 +0000
commit3c012e5950599f0a81dadc351ecf23ee5f84e404 (patch)
tree93f18ef7c47616b522395a80339a9ee3e90f343c
parentec935993f233a8b1329757fc5716a5de1b200d00 (diff)
downloadchrome-ec-3c012e5950599f0a81dadc351ecf23ee5f84e404.tar.gz
COIL: Rename ioexpander i2c address variable
Rename ioexpander i2c address to match current conventions and update any calling locations. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iddad457f73d0dd0167496b794c00e274f8985615 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2697855 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--baseboard/guybrush/baseboard.c4
-rw-r--r--baseboard/zork/variant_trembyle.c4
-rw-r--r--board/burnet/board.c2
-rw-r--r--board/cerise/board.c2
-rw-r--r--board/dalboz/board.c6
-rw-r--r--board/damu/board.c2
-rw-r--r--board/dirinboz/board.c4
-rw-r--r--board/fennel/board.c2
-rw-r--r--board/gumboz/board.c4
-rw-r--r--board/jacuzzi/board.c2
-rw-r--r--board/kappa/board.c2
-rw-r--r--board/servo_v4p1/board.c4
-rw-r--r--board/shuboz/board.c4
-rw-r--r--board/stern/board.c2
-rw-r--r--board/vilboz/board.c2
-rw-r--r--board/willow/board.c2
-rw-r--r--driver/ioexpander/ioexpander_nct38xx.c28
-rw-r--r--driver/ioexpander/it8801.c4
-rw-r--r--driver/ioexpander/pcal6408.c6
-rw-r--r--driver/ioexpander/tca64xxa.c4
-rw-r--r--include/ioexpander.h4
21 files changed, 47 insertions, 47 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c
index ecc67a2f9c..ac4abc1154 100644
--- a/baseboard/guybrush/baseboard.c
+++ b/baseboard/guybrush/baseboard.c
@@ -435,12 +435,12 @@ BUILD_ASSERT(ARRAY_SIZE(usb_muxes) == USBC_PORT_COUNT);
struct ioexpander_config_t ioex_config[] = {
[USBC_PORT_C0] = {
.i2c_host_port = I2C_PORT_TCPC0,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
[USBC_PORT_C1] = {
.i2c_host_port = I2C_PORT_TCPC1,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
};
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c
index 58161b9837..a598f34f7a 100644
--- a/baseboard/zork/variant_trembyle.c
+++ b/baseboard/zork/variant_trembyle.c
@@ -366,12 +366,12 @@ void bc12_interrupt(enum gpio_signal signal)
struct ioexpander_config_t ioex_config[] = {
[USBC_PORT_C0] = {
.i2c_host_port = I2C_PORT_TCPC0,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
[USBC_PORT_C1] = {
.i2c_host_port = I2C_PORT_TCPC1,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
};
diff --git a/board/burnet/board.c b/board/burnet/board.c
index cdc4641766..6b4fc4a44f 100644
--- a/board/burnet/board.c
+++ b/board/burnet/board.c
@@ -107,7 +107,7 @@ struct keyboard_scan_config keyscan_config = {
struct ioexpander_config_t ioex_config[CONFIG_IO_EXPANDER_PORT_COUNT] = {
[0] = {
.i2c_host_port = I2C_PORT_IO_EXPANDER_IT8801,
- .i2c_slave_addr = IT8801_I2C_ADDR,
+ .i2c_addr_flags = IT8801_I2C_ADDR,
.drv = &it8801_ioexpander_drv,
},
};
diff --git a/board/cerise/board.c b/board/cerise/board.c
index ff6fd76ea3..f167795c3c 100644
--- a/board/cerise/board.c
+++ b/board/cerise/board.c
@@ -108,7 +108,7 @@ struct keyboard_scan_config keyscan_config = {
struct ioexpander_config_t ioex_config[CONFIG_IO_EXPANDER_PORT_COUNT] = {
[0] = {
.i2c_host_port = I2C_PORT_IO_EXPANDER_IT8801,
- .i2c_slave_addr = IT8801_I2C_ADDR,
+ .i2c_addr_flags = IT8801_I2C_ADDR,
.drv = &it8801_ioexpander_drv,
},
};
diff --git a/board/dalboz/board.c b/board/dalboz/board.c
index 28114fb361..49b3d118eb 100644
--- a/board/dalboz/board.c
+++ b/board/dalboz/board.c
@@ -622,18 +622,18 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
struct ioexpander_config_t ioex_config[] = {
[IOEX_C0_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC0,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
[IOEX_C1_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC1,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
.flags = IOEX_FLAGS_DISABLED,
},
[IOEX_HDMI_PCAL6408] = {
.i2c_host_port = I2C_PORT_TCPC1,
- .i2c_slave_addr = PCAL6408_I2C_ADDR0,
+ .i2c_addr_flags = PCAL6408_I2C_ADDR0,
.drv = &pcal6408_ioexpander_drv,
.flags = IOEX_FLAGS_DISABLED,
},
diff --git a/board/damu/board.c b/board/damu/board.c
index b945347c46..5e431a66d0 100644
--- a/board/damu/board.c
+++ b/board/damu/board.c
@@ -108,7 +108,7 @@ struct keyboard_scan_config keyscan_config = {
struct ioexpander_config_t ioex_config[CONFIG_IO_EXPANDER_PORT_COUNT] = {
[0] = {
.i2c_host_port = I2C_PORT_IO_EXPANDER_IT8801,
- .i2c_slave_addr = IT8801_I2C_ADDR,
+ .i2c_addr_flags = IT8801_I2C_ADDR,
.drv = &it8801_ioexpander_drv,
},
};
diff --git a/board/dirinboz/board.c b/board/dirinboz/board.c
index 135b84af90..45006ec40e 100644
--- a/board/dirinboz/board.c
+++ b/board/dirinboz/board.c
@@ -504,12 +504,12 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
struct ioexpander_config_t ioex_config[] = {
[IOEX_C0_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC0,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
[IOEX_C1_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC1,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
};
diff --git a/board/fennel/board.c b/board/fennel/board.c
index 0e0dd477fe..1258fd35a0 100644
--- a/board/fennel/board.c
+++ b/board/fennel/board.c
@@ -107,7 +107,7 @@ struct keyboard_scan_config keyscan_config = {
struct ioexpander_config_t ioex_config[CONFIG_IO_EXPANDER_PORT_COUNT] = {
[0] = {
.i2c_host_port = I2C_PORT_IO_EXPANDER_IT8801,
- .i2c_slave_addr = IT8801_I2C_ADDR,
+ .i2c_addr_flags = IT8801_I2C_ADDR,
.drv = &it8801_ioexpander_drv,
},
};
diff --git a/board/gumboz/board.c b/board/gumboz/board.c
index 0abf11e8d1..825b206500 100644
--- a/board/gumboz/board.c
+++ b/board/gumboz/board.c
@@ -506,12 +506,12 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
struct ioexpander_config_t ioex_config[] = {
[IOEX_C0_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC0,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
[IOEX_C1_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC1,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
};
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c
index d39a68e708..2cb25917dc 100644
--- a/board/jacuzzi/board.c
+++ b/board/jacuzzi/board.c
@@ -112,7 +112,7 @@ struct keyboard_scan_config keyscan_config = {
struct ioexpander_config_t ioex_config[CONFIG_IO_EXPANDER_PORT_COUNT] = {
[0] = {
.i2c_host_port = I2C_PORT_IO_EXPANDER_IT8801,
- .i2c_slave_addr = IT8801_I2C_ADDR,
+ .i2c_addr_flags = IT8801_I2C_ADDR,
.drv = &it8801_ioexpander_drv,
},
};
diff --git a/board/kappa/board.c b/board/kappa/board.c
index b11699ecf1..5a174a7299 100644
--- a/board/kappa/board.c
+++ b/board/kappa/board.c
@@ -106,7 +106,7 @@ struct keyboard_scan_config keyscan_config = {
struct ioexpander_config_t ioex_config[CONFIG_IO_EXPANDER_PORT_COUNT] = {
[0] = {
.i2c_host_port = I2C_PORT_IO_EXPANDER_IT8801,
- .i2c_slave_addr = IT8801_I2C_ADDR,
+ .i2c_addr_flags = IT8801_I2C_ADDR,
.drv = &it8801_ioexpander_drv,
},
};
diff --git a/board/servo_v4p1/board.c b/board/servo_v4p1/board.c
index 7d92c603c8..837891794b 100644
--- a/board/servo_v4p1/board.c
+++ b/board/servo_v4p1/board.c
@@ -508,13 +508,13 @@ struct ioexpander_config_t ioex_config[] = {
[0] = {
.drv = &tca64xxa_ioexpander_drv,
.i2c_host_port = TCA6416A_PORT,
- .i2c_slave_addr = TCA6416A_ADDR,
+ .i2c_addr_flags = TCA6416A_ADDR,
.flags = TCA64XXA_FLAG_VER_TCA6416A
},
[1] = {
.drv = &tca64xxa_ioexpander_drv,
.i2c_host_port = TCA6424A_PORT,
- .i2c_slave_addr = TCA6424A_ADDR,
+ .i2c_addr_flags = TCA6424A_ADDR,
.flags = TCA64XXA_FLAG_VER_TCA6424A
}
};
diff --git a/board/shuboz/board.c b/board/shuboz/board.c
index d9116bfd0b..05faa9e5e9 100644
--- a/board/shuboz/board.c
+++ b/board/shuboz/board.c
@@ -523,12 +523,12 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
struct ioexpander_config_t ioex_config[] = {
[IOEX_C0_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC0,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
[IOEX_C1_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC1,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
};
diff --git a/board/stern/board.c b/board/stern/board.c
index f75f4426af..d218df64b2 100644
--- a/board/stern/board.c
+++ b/board/stern/board.c
@@ -108,7 +108,7 @@ struct keyboard_scan_config keyscan_config = {
struct ioexpander_config_t ioex_config[CONFIG_IO_EXPANDER_PORT_COUNT] = {
[0] = {
.i2c_host_port = I2C_PORT_IO_EXPANDER_IT8801,
- .i2c_slave_addr = IT8801_I2C_ADDR,
+ .i2c_addr_flags = IT8801_I2C_ADDR,
.drv = &it8801_ioexpander_drv,
},
};
diff --git a/board/vilboz/board.c b/board/vilboz/board.c
index e6e647a386..bc747754eb 100644
--- a/board/vilboz/board.c
+++ b/board/vilboz/board.c
@@ -486,7 +486,7 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
struct ioexpander_config_t ioex_config[] = {
[IOEX_C0_NCT3807] = {
.i2c_host_port = I2C_PORT_TCPC0,
- .i2c_slave_addr = NCT38XX_I2C_ADDR1_1_FLAGS,
+ .i2c_addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
.drv = &nct38xx_ioexpander_drv,
},
};
diff --git a/board/willow/board.c b/board/willow/board.c
index df088b266c..ee13dee75b 100644
--- a/board/willow/board.c
+++ b/board/willow/board.c
@@ -106,7 +106,7 @@ struct keyboard_scan_config keyscan_config = {
struct ioexpander_config_t ioex_config[CONFIG_IO_EXPANDER_PORT_COUNT] = {
[0] = {
.i2c_host_port = I2C_PORT_IO_EXPANDER_IT8801,
- .i2c_slave_addr = IT8801_I2C_ADDR,
+ .i2c_addr_flags = IT8801_I2C_ADDR,
.drv = &it8801_ioexpander_drv,
},
};
diff --git a/driver/ioexpander/ioexpander_nct38xx.c b/driver/ioexpander/ioexpander_nct38xx.c
index b6966c584d..8c87a33d24 100644
--- a/driver/ioexpander/ioexpander_nct38xx.c
+++ b/driver/ioexpander/ioexpander_nct38xx.c
@@ -57,7 +57,7 @@ static int nct38xx_ioex_init(int ioex)
* 000: NCT3807
* 010: NCT3808
*/
- rv = i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
TCPC_REG_BCD_DEV, &val);
if (rv != EC_SUCCESS) {
@@ -78,7 +78,7 @@ static int nct38xx_ioex_init(int ioex)
*/
if (!IS_ENABLED(CONFIG_USB_PD_TCPM_NCT38XX)) {
rv = i2c_write16(ioex_p->i2c_host_port,
- ioex_p->i2c_slave_addr, TCPC_REG_ALERT_MASK,
+ ioex_p->i2c_addr_flags, TCPC_REG_ALERT_MASK,
TCPC_REG_ALERT_VENDOR_DEF);
if (rv != EC_SUCCESS)
return rv;
@@ -96,7 +96,7 @@ static int nct38xx_ioex_get_level(int ioex, int port, int mask, int *val)
reg = NCT38XX_REG_GPIO_DATA_IN(port);
rv = i2c_read8(ioex_config[ioex].i2c_host_port,
- ioex_config[ioex].i2c_slave_addr, reg, val);
+ ioex_config[ioex].i2c_addr_flags, reg, val);
if (rv != EC_SUCCESS)
return rv;
@@ -116,7 +116,7 @@ static int nct38xx_ioex_set_level(int ioex, int port, int mask, int value)
reg = NCT38XX_REG_GPIO_DATA_OUT(port);
rv = i2c_read8(ioex_config[ioex].i2c_host_port,
- ioex_config[ioex].i2c_slave_addr, reg, &val);
+ ioex_config[ioex].i2c_addr_flags, reg, &val);
if (rv != EC_SUCCESS)
return rv;
@@ -126,7 +126,7 @@ static int nct38xx_ioex_set_level(int ioex, int port, int mask, int value)
val &= ~mask;
return i2c_write8(ioex_config[ioex].i2c_host_port,
- ioex_config[ioex].i2c_slave_addr, reg, val);
+ ioex_config[ioex].i2c_addr_flags, reg, val);
}
static int nct38xx_ioex_get_flags(int ioex, int port, int mask, int *flags)
@@ -135,7 +135,7 @@ static int nct38xx_ioex_get_flags(int ioex, int port, int mask, int *flags)
struct ioexpander_config_t *ioex_p = &ioex_config[ioex];
i2c_port = ioex_p->i2c_host_port;
- i2c_addr = ioex_p->i2c_slave_addr;
+ i2c_addr = ioex_p->i2c_addr_flags;
rv = nct38xx_ioex_check_is_valid(ioex, port, mask);
if (rv != EC_SUCCESS)
@@ -244,7 +244,7 @@ static int nct38xx_ioex_set_flags_by_mask(int ioex, int port, int mask,
struct ioexpander_config_t *ioex_p = &ioex_config[ioex];
i2c_port = ioex_p->i2c_host_port;
- i2c_addr = ioex_p->i2c_slave_addr;
+ i2c_addr = ioex_p->i2c_addr_flags;
rv = nct38xx_ioex_check_is_valid(ioex, port, mask);
if (rv != EC_SUCCESS)
@@ -348,13 +348,13 @@ static int nct38xx_ioex_enable_interrupt(int ioex, int port, int mask,
/* Clear the pending bit */
reg = NCT38XX_REG_GPIO_ALERT_STAT(port);
- rv = i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, &val);
if (rv != EC_SUCCESS)
return rv;
val |= mask;
- rv = i2c_write8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_write8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, val);
if (rv != EC_SUCCESS)
return rv;
@@ -370,7 +370,7 @@ static int nct38xx_ioex_enable_interrupt(int ioex, int port, int mask,
val = chip_data[ioex].int_mask[port];
}
- return i2c_write8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ return i2c_write8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, val);
}
@@ -389,7 +389,7 @@ int nct38xx_ioex_event_handler(int ioex)
* Read ALERT_STAT_0 and ALERT_STAT_1 register in a single I2C
* transaction to increase efficiency
*/
- rv = i2c_read16(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_read16(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, &int_status);
if (rv != EC_SUCCESS)
return rv;
@@ -399,7 +399,7 @@ int nct38xx_ioex_event_handler(int ioex)
* Clear the changed status bits in ALERT_STAT_0 and ALERT_STAT_1
* register in a single I2C transaction to increase efficiency
*/
- rv = i2c_write16(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_write16(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, int_status);
if (rv != EC_SUCCESS)
return rv;
@@ -443,14 +443,14 @@ void nct38xx_ioex_handle_alert(int ioex)
int rv, status;
struct ioexpander_config_t *ioex_p = &ioex_config[ioex];
- rv = i2c_read16(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_read16(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
TCPC_REG_ALERT, &status);
if (rv != EC_SUCCESS)
CPRINTF("fail to read ALERT register\n");
if (status & TCPC_REG_ALERT_VENDOR_DEF) {
rv = i2c_write16(ioex_p->i2c_host_port,
- ioex_p->i2c_slave_addr, TCPC_REG_ALERT,
+ ioex_p->i2c_addr_flags, TCPC_REG_ALERT,
TCPC_REG_ALERT_VENDOR_DEF);
if (rv != EC_SUCCESS) {
CPRINTF("Fail to clear Vendor Define mask\n");
diff --git a/driver/ioexpander/it8801.c b/driver/ioexpander/it8801.c
index d59bee8e3f..ebe1809f18 100644
--- a/driver/ioexpander/it8801.c
+++ b/driver/ioexpander/it8801.c
@@ -200,7 +200,7 @@ static int it8801_ioex_read(int ioex, int reg, int *data)
{
struct ioexpander_config_t *ioex_p = &ioex_config[ioex];
- return i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ return i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, data);
}
@@ -208,7 +208,7 @@ static int it8801_ioex_write(int ioex, int reg, int data)
{
struct ioexpander_config_t *ioex_p = &ioex_config[ioex];
- return i2c_write8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ return i2c_write8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, data);
}
diff --git a/driver/ioexpander/pcal6408.c b/driver/ioexpander/pcal6408.c
index 72146ceaa5..287e0506d0 100644
--- a/driver/ioexpander/pcal6408.c
+++ b/driver/ioexpander/pcal6408.c
@@ -29,7 +29,7 @@ static int pcal6408_read(int ioex, int reg, int *data)
int rv;
struct ioexpander_config_t *ioex_p = &ioex_config[ioex];
- rv = i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, data);
return rv;
@@ -40,7 +40,7 @@ static int pcal6408_write(int ioex, int reg, int data)
int rv;
struct ioexpander_config_t *ioex_p = &ioex_config[ioex];
- rv = i2c_write8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_write8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
reg, data);
return rv;
@@ -316,7 +316,7 @@ int pcal6408_ioex_event_handler(int ioex)
* Read input port register will clear the interrupt,
* read status register will not.
*/
- rv = i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_slave_addr,
+ rv = i2c_read8(ioex_p->i2c_host_port, ioex_p->i2c_addr_flags,
PCAL6408_REG_INT_STATUS, &int_status);
if (rv != EC_SUCCESS)
return rv;
diff --git a/driver/ioexpander/tca64xxa.c b/driver/ioexpander/tca64xxa.c
index 0a65fdc5ca..9a70ceec11 100644
--- a/driver/ioexpander/tca64xxa.c
+++ b/driver/ioexpander/tca64xxa.c
@@ -28,7 +28,7 @@ static int tca64xxa_write_byte(int ioex, int port, int reg, uint8_t val)
const int reg_addr = TCA64XXA_PORT_ID(port, reg, ioex_p->flags);
return i2c_write8(ioex_p->i2c_host_port,
- ioex_p->i2c_slave_addr,
+ ioex_p->i2c_addr_flags,
reg_addr,
val);
}
@@ -39,7 +39,7 @@ static int tca64xxa_read_byte(int ioex, int port, int reg, int *val)
const int reg_addr = TCA64XXA_PORT_ID(port, reg, ioex_p->flags);
return i2c_read8(ioex_p->i2c_host_port,
- ioex_p->i2c_slave_addr,
+ ioex_p->i2c_addr_flags,
reg_addr,
val);
}
diff --git a/include/ioexpander.h b/include/ioexpander.h
index e952e373a7..4cd1930385 100644
--- a/include/ioexpander.h
+++ b/include/ioexpander.h
@@ -60,8 +60,8 @@ struct ioexpander_drv {
struct ioexpander_config_t {
/* Physical I2C port connects to the IO expander chip. */
int i2c_host_port;
- /* I2C slave address */
- int i2c_slave_addr;
+ /* I2C address */
+ int i2c_addr_flags;
/*
* Pointer to the specific IO expander chip's ops defined in
* the struct ioexpander_drv.