diff options
author | Denis Brockus <dbrockus@google.com> | 2020-03-17 12:21:05 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-20 04:39:57 +0000 |
commit | 03f5a8686a6a2274c176ead7fb928571a3e7c1f5 (patch) | |
tree | 09f467e642ce635a4e135534dbbd2ce9c0edab5f /include/usb_pd_tcpm.h | |
parent | 024e5e7811ee09801b55b08f274cb95e63c741d2 (diff) | |
download | chrome-ec-03f5a8686a6a2274c176ead7fb928571a3e7c1f5.tar.gz |
tcpmv2: cleanup auto discharge disconnect
This CL is based on the inability to boot trembyle when a
battery is not connected. The failure looks like it is always
right after AutoDischargeDisconnect has been set. I asked
Nuvoton if we could go back to using ForcedDischarge and
veer away from AutoDischargeDisconnect and I was told no
that it is now required.
My first step was to determine how close the existing
AutoDischargeDisconnect was to the spec and found enough
difference that I wanted to get that in line before
trying to pinpoint the issues causing this problem.
BUG=none
BRANCH=none
TEST=get tcpmv2 to work without a battery attached
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I44b86ae5dfcf6b547c742c1af0228a0ed8e3520d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2105935
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r-- | include/usb_pd_tcpm.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h index 4589fc4839..35f9cccb47 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -320,8 +320,9 @@ struct tcpm_drv { int enable); /** - * Set new connection - * There is a new connection. May have to handle differently + * Set connection + * If this is a disconnect, set the ROLE_CONTROL, otherwise + * this is a new connection. May have to handle differently * if we were performing auto-toggle. Allow a driver to do * any work required to leave the unattached auto-toggle mode * as well as setting the CC lines. If auto-toggle is not @@ -330,11 +331,13 @@ struct tcpm_drv { * * @param port Type-C port number * @param pull enum tcpc_cc_pull of CC lines + * @param connect Connect(1) or Disconnect(0) * * @return EC_SUCCESS or error */ - int (*set_new_connection)(int port, - enum tcpc_cc_pull pull); + int (*set_connection)(int port, + enum tcpc_cc_pull pull, + int connect); #ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE /** |