diff options
author | Jett Rink <jettrink@chromium.org> | 2018-08-07 13:00:16 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-07 18:09:00 -0700 |
commit | 3ef0c3567bc72ee347225a61f2e5e645afd71591 (patch) | |
tree | c79b6067d6dd130fc6be7f3d1b9db5d985594fda /driver | |
parent | e750da58458108fae8f83318d61daa5667004dd7 (diff) | |
download | chrome-ec-3ef0c3567bc72ee347225a61f2e5e645afd71591.tar.gz |
ps8751: Revert VBus hack to bypass caching
All of the boards that are using the PS8751 with the
CONFIG_USB_PD_VBUS_DETECT_TCPC have upgraded their TCPC firmware version
past 0x38. We can now use the standard VBus present caching mechanism.
BRANCH=none
BUG=b:77639399,b:110022315
TEST=phaser can negotiated Vbus on C1 still.
Change-Id: I1ee69a67fc78560dde86b2affc288de0f329f53f
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1165856
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/tcpm/ps8xxx.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c index 15580b5d3f..4d4960580c 100644 --- a/driver/tcpm/ps8xxx.c +++ b/driver/tcpm/ps8xxx.c @@ -92,28 +92,6 @@ int ps8xxx_tcpc_get_fw_version(int port, int *version) return tcpc_read(port, FW_VER_REG, version); } -#ifdef CONFIG_USB_PD_VBUS_DETECT_TCPC -/* - * Read Vbus level directly instead of using the cached version because some - * TCPCs do not fire the Vbus level change interrupt correctly after resuming - * from low-power mode. - * - * TODO(b/77639399): Remove this method once PS8751 firmware has updated to - * support better handling of vbus detection - */ -int ps8xxx_tcpm_get_vbus_level(int port) -{ - int reg; - - /* Read Power Status register */ - if (tcpc_read(port, TCPC_REG_POWER_STATUS, ®) == EC_SUCCESS) - return reg & TCPC_REG_POWER_STATUS_VBUS_PRES ? 1 : 0; - - /* If read failed, report that Vbus is off */ - return 0; -} -#endif - static int ps8xxx_tcpc_bist_mode_2(int port) { int rv; @@ -163,11 +141,7 @@ const struct tcpm_drv ps8xxx_tcpm_drv = { .release = &ps8xxx_tcpm_release, .get_cc = &tcpci_tcpm_get_cc, #ifdef CONFIG_USB_PD_VBUS_DETECT_TCPC -/* - * TODO(b/77639399): Replace with tcpci_tcpm_get_vbus_level() after firmware - * upgrade. - */ - .get_vbus_level = &ps8xxx_tcpm_get_vbus_level, + .get_vbus_level = &tcpci_tcpm_get_vbus_level, #endif .select_rp_value = &tcpci_tcpm_select_rp_value, .set_cc = &tcpci_tcpm_set_cc, |