diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2022-04-21 11:18:45 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-10 01:55:37 +0000 |
commit | 03df4b2fc497fb1e2865ca9027910a5168394e80 (patch) | |
tree | 1508b911ce5df94983c23c0f042d246aeea60531 /driver/tcpm | |
parent | 986a6f8512db96a487864d6caec224d3b9340a5f (diff) | |
download | chrome-ec-03df4b2fc497fb1e2865ca9027910a5168394e80.tar.gz |
TCPCI: Allow TCPM to use sink/source control without PPCs presence
This patch removes define CONFIG_USBC_PPC to allow TCPM to use
sink and source control without PPCs presence. since they exist
generally in TCPCI specification independently of PPCs.
BUG=b:211791444
BRANCH=none
TEST=make buildall
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: Ia4be8bf872f981c23908944381b156778f63064b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3597314
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'driver/tcpm')
-rw-r--r-- | driver/tcpm/anx7447.c | 2 | ||||
-rw-r--r-- | driver/tcpm/mt6370.c | 2 | ||||
-rw-r--r-- | driver/tcpm/nct38xx.c | 4 | ||||
-rw-r--r-- | driver/tcpm/ps8xxx.c | 4 | ||||
-rw-r--r-- | driver/tcpm/rt1715.c | 4 | ||||
-rw-r--r-- | driver/tcpm/rt1718s.c | 2 | ||||
-rw-r--r-- | driver/tcpm/tcpci.c | 4 | ||||
-rw-r--r-- | driver/tcpm/tusb422.c | 4 |
8 files changed, 3 insertions, 23 deletions
diff --git a/driver/tcpm/anx7447.c b/driver/tcpm/anx7447.c index d025191c6d..2bcfab4a92 100644 --- a/driver/tcpm/anx7447.c +++ b/driver/tcpm/anx7447.c @@ -881,10 +881,8 @@ const struct tcpm_drv anx7447_tcpm_drv = { .drp_toggle = anx7447_tcpc_drp_toggle, #endif .get_chip_info = &tcpci_get_chip_info, -#ifdef CONFIG_USB_PD_PPC .set_snk_ctrl = &tcpci_tcpm_set_snk_ctrl, .set_src_ctrl = &tcpci_tcpm_set_src_ctrl, -#endif #ifdef CONFIG_USB_PD_TCPC_LOW_POWER .enter_low_power_mode = &tcpci_enter_low_power_mode, #endif diff --git a/driver/tcpm/mt6370.c b/driver/tcpm/mt6370.c index 100a4d9eeb..7f4cb5b3d3 100644 --- a/driver/tcpm/mt6370.c +++ b/driver/tcpm/mt6370.c @@ -211,10 +211,8 @@ const struct tcpm_drv mt6370_tcpm_drv = { .drp_toggle = &tcpci_tcpc_drp_toggle, #endif .get_chip_info = &tcpci_get_chip_info, -#ifdef CONFIG_USB_PD_PPC .set_snk_ctrl = &tcpci_tcpm_set_snk_ctrl, .set_src_ctrl = &tcpci_tcpm_set_src_ctrl, -#endif #ifdef CONFIG_USB_PD_TCPC_LOW_POWER .enter_low_power_mode = &mt6370_enter_low_power_mode, #endif diff --git a/driver/tcpm/nct38xx.c b/driver/tcpm/nct38xx.c index 592a86929c..8b6690524c 100644 --- a/driver/tcpm/nct38xx.c +++ b/driver/tcpm/nct38xx.c @@ -231,7 +231,6 @@ static int nct38xx_tcpm_set_cc(int port, int pull) return tcpci_tcpm_set_cc(port, pull); } -#ifdef CONFIG_USB_PD_PPC static int nct38xx_tcpm_set_snk_ctrl(int port, int enable) { int rv; @@ -251,7 +250,6 @@ static int nct38xx_tcpm_set_snk_ctrl(int port, int enable) return tcpci_tcpm_set_snk_ctrl(port, enable); } -#endif static inline int tcpc_read_alert_no_lpm_exit(int port, int *val) { @@ -396,12 +394,10 @@ const struct tcpm_drv nct38xx_tcpm_drv = { #ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE .drp_toggle = &tcpci_tcpc_drp_toggle, #endif -#ifdef CONFIG_USB_PD_PPC .get_snk_ctrl = &tcpci_tcpm_get_snk_ctrl, .set_snk_ctrl = &nct38xx_tcpm_set_snk_ctrl, .get_src_ctrl = &tcpci_tcpm_get_src_ctrl, .set_src_ctrl = &tcpci_tcpm_set_src_ctrl, -#endif .get_chip_info = &tcpci_get_chip_info, #ifdef CONFIG_USB_PD_TCPC_LOW_POWER .enter_low_power_mode = &tcpci_enter_low_power_mode, diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c index e270b91be4..212a7f10dd 100644 --- a/driver/tcpm/ps8xxx.c +++ b/driver/tcpm/ps8xxx.c @@ -981,11 +981,9 @@ const struct tcpm_drv ps8xxx_tcpm_drv = { #ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE .drp_toggle = ps8xxx_tcpc_drp_toggle, #endif -#ifdef CONFIG_USB_PD_PPC + .get_chip_info = ps8xxx_get_chip_info, .set_snk_ctrl = tcpci_tcpm_set_snk_ctrl, .set_src_ctrl = tcpci_tcpm_set_src_ctrl, -#endif - .get_chip_info = ps8xxx_get_chip_info, #ifdef CONFIG_USB_PD_TCPC_LOW_POWER .enter_low_power_mode = ps8xxx_enter_low_power_mode, #endif diff --git a/driver/tcpm/rt1715.c b/driver/tcpm/rt1715.c index ed3d283bc9..7985ee95a3 100644 --- a/driver/tcpm/rt1715.c +++ b/driver/tcpm/rt1715.c @@ -251,11 +251,9 @@ const struct tcpm_drv rt1715_tcpm_drv = { #ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE .drp_toggle = &tcpci_tcpc_drp_toggle, #endif -#ifdef CONFIG_USB_PD_PPC + .get_chip_info = &tcpci_get_chip_info, .set_snk_ctrl = &tcpci_tcpm_set_snk_ctrl, .set_src_ctrl = &tcpci_tcpm_set_src_ctrl, -#endif - .get_chip_info = &tcpci_get_chip_info, #ifdef CONFIG_USB_PD_TCPC_LOW_POWER .enter_low_power_mode = &rt1715_enter_low_power_mode, #endif diff --git a/driver/tcpm/rt1718s.c b/driver/tcpm/rt1718s.c index cd32f85da4..2b5fb6068e 100644 --- a/driver/tcpm/rt1718s.c +++ b/driver/tcpm/rt1718s.c @@ -751,10 +751,8 @@ const struct tcpm_drv rt1718s_tcpm_drv = { .drp_toggle = &tcpci_tcpc_drp_toggle, #endif .get_chip_info = &tcpci_get_chip_info, -#ifdef CONFIG_USB_PD_PPC .set_snk_ctrl = &rt1718s_tcpm_set_snk_ctrl, .set_src_ctrl = &tcpci_tcpm_set_src_ctrl, -#endif #ifdef CONFIG_USB_PD_TCPC_LOW_POWER .enter_low_power_mode = &rt1718s_enter_low_power_mode, #endif diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c index 42e7bb357a..a55db12e1c 100644 --- a/driver/tcpm/tcpci.c +++ b/driver/tcpm/tcpci.c @@ -604,7 +604,6 @@ int tcpci_tcpm_set_polarity(int port, enum tcpc_cc_polarity polarity) ? MASK_SET : MASK_CLR); } -#ifdef CONFIG_USB_PD_PPC bool tcpci_tcpm_get_snk_ctrl(int port) { int rv; @@ -642,7 +641,6 @@ int tcpci_tcpm_set_src_ctrl(int port, int enable) return tcpc_write(port, TCPC_REG_COMMAND, cmd); } -#endif __maybe_unused int tcpci_tcpm_sop_prime_enable(int port, bool enable) { @@ -1863,12 +1861,10 @@ const struct tcpm_drv tcpci_tcpm_drv = { .drp_toggle = &tcpci_tcpc_drp_toggle, #endif .get_chip_info = &tcpci_get_chip_info, -#ifdef CONFIG_USB_PD_PPC .get_snk_ctrl = &tcpci_tcpm_get_snk_ctrl, .set_snk_ctrl = &tcpci_tcpm_set_snk_ctrl, .get_src_ctrl = &tcpci_tcpm_get_src_ctrl, .set_src_ctrl = &tcpci_tcpm_set_src_ctrl, -#endif #ifdef CONFIG_USB_PD_TCPC_LOW_POWER .enter_low_power_mode = &tcpci_enter_low_power_mode, #endif diff --git a/driver/tcpm/tusb422.c b/driver/tcpm/tusb422.c index f2a4ec2fb3..6e07bce5e1 100644 --- a/driver/tcpm/tusb422.c +++ b/driver/tcpm/tusb422.c @@ -180,11 +180,9 @@ const struct tcpm_drv tusb422_tcpm_drv = { #ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE .drp_toggle = &tusb422_tcpc_drp_toggle, #endif -#ifdef CONFIG_USB_PD_PPC + .get_chip_info = &tcpci_get_chip_info, .set_snk_ctrl = &tcpci_tcpm_set_snk_ctrl, .set_src_ctrl = &tcpci_tcpm_set_src_ctrl, -#endif - .get_chip_info = &tcpci_get_chip_info, #ifdef CONFIG_USB_PD_TCPC_LOW_POWER .enter_low_power_mode = &tcpci_enter_low_power_mode, #endif |