diff options
author | Scott Collyer <scollyer@google.com> | 2019-04-02 17:35:02 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-17 21:32:25 -0700 |
commit | f562e995c896e32816f013b848b8ffe61c8f09cd (patch) | |
tree | f19048398dc014684479eb162f3db3e56cbd9f24 /baseboard/dragonegg | |
parent | 8841b815c195aadacb8f0f6e625041c3427bbd97 (diff) | |
download | chrome-ec-f562e995c896e32816f013b848b8ffe61c8f09cd.tar.gz |
tcpm: Refactor tcpc_config to include a flags field
tcpc_config contained a field for both the alert polarity and open
drain/push pull configuration. There is also a possible difference in TCPC
reset polarity. Instead of adding yet another field to describe this
configuration, it would be better to convert alert polairty, open
drain and reset polarity into a single flags field.
This CL modifies the tcpc_config struct to use a single flags field
and adds defines for what existing flag options can be.
BUG=b:130194031
BRANCH=none
TEST=make -j buildall
Change-Id: Ifb7e7604edb7021fb2d36ee279049eb52fefc99e
Signed-off-by: Scott Collyer <scollyer@google.com>
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1551581
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'baseboard/dragonegg')
-rw-r--r-- | baseboard/dragonegg/baseboard.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/baseboard/dragonegg/baseboard.c b/baseboard/dragonegg/baseboard.c index 54cc16a98d..dbf3a8fedd 100644 --- a/baseboard/dragonegg/baseboard.c +++ b/baseboard/dragonegg/baseboard.c @@ -166,20 +166,23 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = { [USB_PD_PORT_ITE_0] = { /* TCPC is embedded within EC so no i2c config needed */ .drv = &it83xx_tcpm_drv, - .pol = TCPC_ALERT_ACTIVE_LOW, + /* Alert is active-low, push-pull */ + .flags = 0, }, [USB_PD_PORT_ITE_1] = { /* TCPC is embedded within EC so no i2c config needed */ .drv = &it83xx_tcpm_drv, - .pol = TCPC_ALERT_ACTIVE_LOW, + /* Alert is active-low, push-pull */ + .flags = 0, }, [USB_PD_PORT_TUSB422_2] = { .i2c_host_port = I2C_PORT_USBC1C2, .i2c_slave_addr = TUSB422_I2C_ADDR, .drv = &tusb422_tcpm_drv, - .pol = TCPC_ALERT_ACTIVE_LOW, + /* Alert is active-low, push-pull */ + .flags = 0, }, }; |