summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2016-07-15 19:38:20 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-21 00:48:05 -0700
commit4fe82acac2f4c9e458321611a424fb7fbc74e363 (patch)
treef224eaa7059d4fa22a96fafaf048630db8536fd6 /board
parentf2fa9c94772f245bf7b91779a4765103d07df156 (diff)
downloadchrome-ec-4fe82acac2f4c9e458321611a424fb7fbc74e363.tar.gz
tcpm: anx74xx: Add alert polarity member to tcpc_config_t
This allows us to specify the polarity of the alert signal for each TCPC chip onboard, even if we have multiple instances of the same chip. BUG=none BRANCH=none TEST=built and booted on reef Change-Id: I06a58c4e26892843243e8e98f2c86c6d3a696eb1 Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/360948 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/amenia/board.c6
-rw-r--r--board/amenia/board.h1
-rw-r--r--board/reef/board.c4
3 files changed, 6 insertions, 5 deletions
diff --git a/board/amenia/board.c b/board/amenia/board.c
index 56d02895b5..a019ba0a5e 100644
--- a/board/amenia/board.c
+++ b/board/amenia/board.c
@@ -139,8 +139,10 @@ const struct i2c_port_t i2c_ports[] = {
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
- {I2C_PORT_TCPC0, TCPC0_I2C_ADDR, &anx74xx_tcpm_drv},
- {I2C_PORT_TCPC1, TCPC1_I2C_ADDR, &tcpci_tcpm_drv},
+ {I2C_PORT_TCPC0, TCPC0_I2C_ADDR, &anx74xx_tcpm_drv,
+ TCPC_ALERT_ACTIVE_HIGH},
+ {I2C_PORT_TCPC1, TCPC1_I2C_ADDR, &tcpci_tcpm_drv,
+ TCPC_ALERT_ACTIVE_LOW},
};
const enum gpio_signal hibernate_wake_pins[] = {
diff --git a/board/amenia/board.h b/board/amenia/board.h
index 5833543fb1..c1d0e16c43 100644
--- a/board/amenia/board.h
+++ b/board/amenia/board.h
@@ -88,7 +88,6 @@
#define CONFIG_USB_PD_PORT_COUNT 2
#define CONFIG_USB_PD_TCPM_ANX74XX
#define TCPC0_I2C_ADDR 0x50
-#define ANX74XX_INT_ACTIVE_POLARITY ANX74XX_REG_IRQ_POL_HIGH
#define CONFIG_USB_PD_TCPM_PS8751
#define CONFIG_USB_PD_TCPM_TCPCI
#define TCPC1_I2C_ADDR 0x16
diff --git a/board/reef/board.c b/board/reef/board.c
index 87bcc263fa..032fc79cce 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -126,8 +126,8 @@ const struct i2c_port_t i2c_ports[] = {
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
- {NPCX_I2C_PORT0_0, 0x50, &anx74xx_tcpm_drv},
- {NPCX_I2C_PORT0_1, 0x16, &tcpci_tcpm_drv},
+ {NPCX_I2C_PORT0_0, 0x50, &anx74xx_tcpm_drv, TCPC_ALERT_ACTIVE_HIGH},
+ {NPCX_I2C_PORT0_1, 0x16, &tcpci_tcpm_drv, TCPC_ALERT_ACTIVE_LOW},
};
uint16_t tcpc_get_alert_status(void)