diff options
author | Boris Mittelberg <bmbm@google.com> | 2023-04-20 16:30:03 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-25 00:02:00 +0000 |
commit | 0c7848ad95b4fdebda70365a74da76032466ab1f (patch) | |
tree | ad9b7c5c122ed3ed6a1f2e7f398ee595a505cc74 | |
parent | 375ed4452465e6858e62b77b3927be4c7b678477 (diff) | |
download | chrome-ec-release-R114-15437.B-main.tar.gz |
ktu1125: set polarity only when applying VCONNrelease-R114-15437.B-main
Makes set_polarity a no-op. CC polarity should only be set
when VCONN is applied.
BUG=b:278116464
BRANCH=none
TEST=manual test on rex sku2
Change-Id: I27d818bb75a2d79ef74e6eb7976e6e896f93be1a
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4455743
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
-rw-r--r-- | driver/ppc/ktu1125.c | 15 | ||||
-rw-r--r-- | zephyr/Kconfig.ppc | 1 |
2 files changed, 6 insertions, 10 deletions
diff --git a/driver/ppc/ktu1125.c b/driver/ppc/ktu1125.c index 698c4f6cb1..647512d801 100644 --- a/driver/ppc/ktu1125.c +++ b/driver/ppc/ktu1125.c @@ -280,15 +280,12 @@ static int ktu1125_is_sourcing_vbus(int port) #ifdef CONFIG_USBC_PPC_POLARITY static int ktu1125_set_polarity(int port, int polarity) { - if (polarity) { - /* CC2 active. */ - clr_flags(port, KTU1125_CTRL_SW_CFG, KTU1125_CC2S_VCONN); - return set_flags(port, KTU1125_CTRL_SW_CFG, KTU1125_CC1S_VCONN); - } - - /* else CC1 active. */ - clr_flags(port, KTU1125_CTRL_SW_CFG, KTU1125_CC1S_VCONN); - return set_flags(port, KTU1125_CTRL_SW_CFG, KTU1125_CC2S_VCONN); + /* + * KTU1125 doesn't need to be informed about polarity. + * Polarity is queried via pd_get_polarity when applying VCONN. + */ + ppc_prints("KTU1125 sets polarity only when applying VCONN", port); + return EC_SUCCESS; } #endif diff --git a/zephyr/Kconfig.ppc b/zephyr/Kconfig.ppc index 7893e0ae08..85cae5b664 100644 --- a/zephyr/Kconfig.ppc +++ b/zephyr/Kconfig.ppc @@ -83,7 +83,6 @@ config PLATFORM_EC_USBC_PPC_KTU1125 default y depends on DT_HAS_KINETIC_KTU1125_ENABLED select PLATFORM_EC_USBC_OCP - select PLATFORM_EC_USBC_PPC_POLARITY select PLATFORM_EC_USBC_PPC_SBU select PLATFORM_EC_USBC_PPC_VCONN if PLATFORM_EC_USBC_VCONN help |