diff options
author | Aseda Aboagye <aaboagye@chromium.org> | 2020-03-25 23:43:12 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-26 02:49:58 +0000 |
commit | 383b6c51874e61d9a3dd637f477a67af33e51340 (patch) | |
tree | a67b49316c10d31d6bfe3588b1db73f8a756332b /driver/tcpm/tcpm.h | |
parent | eb6401aa2ccf38afadc1fc2978cbd2a6d9a7c4ce (diff) | |
download | chrome-ec-383b6c51874e61d9a3dd637f477a67af33e51340.tar.gz |
Revert "tcpmv2: cleanup auto discharge disconnect"
This reverts commit 03f5a8686a6a2274c176ead7fb928571a3e7c1f5.
Reason for revert: This is causing chargers to not work in one
orientation with the RAA489000 used on waddledoo.
BUG=b:152444591
Original change's description:
> 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>
Bug: none
Change-Id: Id2afdeb8d48d044a0a94277dfa0c388f864e838f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2121178
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpm.h')
-rw-r--r-- | driver/tcpm/tcpm.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/driver/tcpm/tcpm.h b/driver/tcpm/tcpm.h index f9453d418c..373fbf545f 100644 --- a/driver/tcpm/tcpm.h +++ b/driver/tcpm/tcpm.h @@ -178,16 +178,16 @@ static inline int tcpm_set_cc(int port, int pull) return tcpc_config[port].drv->set_cc(port, pull); } -static inline int tcpm_set_connection(int port, - enum tcpc_cc_pull pull, - int connect) +static inline int tcpm_set_new_connection(int port, + enum tcpc_cc_pull pull) { const struct tcpm_drv *tcpc = tcpc_config[port].drv; if (IS_ENABLED(CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE) && - tcpc->set_connection) - return tcpc->set_connection(port, pull, connect); - return EC_SUCCESS; + tcpc->set_new_connection) + return tcpc->set_new_connection(port, pull); + else + return tcpc->set_cc(port, pull); } static inline int tcpm_set_polarity(int port, enum tcpc_cc_polarity polarity) |