summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpm.h
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@google.com>2020-05-14 21:37:26 -0600
committerCommit Bot <commit-bot@chromium.org>2020-05-19 04:33:42 +0000
commit5e32f948d370fff182616bd987ffdc794f6858a6 (patch)
tree00d6e3de91e67397f1257acdbfdfb167f53fad04 /driver/tcpm/tcpm.h
parent825289a97d5341128c9baab650b9d9d8b4ff7c7b (diff)
downloadchrome-ec-5e32f948d370fff182616bd987ffdc794f6858a6.tar.gz
tcpc: AutoDischarge can be enabled on any connection wake
I thought AutoDischarge could only be enabled when waking if DRP was enabled. This is not the case and I am removing the unnecessary portions of code dealing with this distinction. BUG=none BRANCH=none TEST=verify connections continue to work Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Iddea93a0749842f366b046594f9abb936b1ec523 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2202564 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpm.h')
-rw-r--r--driver/tcpm/tcpm.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/driver/tcpm/tcpm.h b/driver/tcpm/tcpm.h
index c62235eec9..f97bb39b9c 100644
--- a/driver/tcpm/tcpm.h
+++ b/driver/tcpm/tcpm.h
@@ -180,16 +180,13 @@ static inline int tcpm_set_cc(int port, int pull)
static inline int tcpm_set_connection(int port,
enum tcpc_cc_pull pull,
- int connect,
- int *prev_drp)
+ int connect)
{
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, prev_drp);
- else if (prev_drp)
- *prev_drp = 0;
+ return tcpc->set_connection(port, pull, connect);
return EC_SUCCESS;
}