From f562e995c896e32816f013b848b8ffe61c8f09cd Mon Sep 17 00:00:00 2001 From: Scott Collyer Date: Tue, 2 Apr 2019 17:35:02 -0700 Subject: 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 Signed-off-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/1551581 Commit-Ready: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Jett Rink Reviewed-by: Paul Fagerburg --- board/nautilus/board.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'board/nautilus') diff --git a/board/nautilus/board.c b/board/nautilus/board.c index dd79aebf27..5bb202982e 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -171,13 +171,15 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = { .i2c_host_port = NPCX_I2C_PORT0_0, .i2c_slave_addr = PS8751_I2C_ADDR1, .drv = &ps8xxx_tcpm_drv, - .pol = TCPC_ALERT_ACTIVE_LOW, + /* Alert is active-low, push-pull */ + .flags = 0, }, { .i2c_host_port = NPCX_I2C_PORT0_1, .i2c_slave_addr = PS8751_I2C_ADDR1, .drv = &ps8xxx_tcpm_drv, - .pol = TCPC_ALERT_ACTIVE_LOW, + /* Alert is active-low, push-pull */ + .flags = 0, }, }; -- cgit v1.2.1