summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatryk Duda <pdk@semihalf.com>2020-09-04 13:27:56 +0200
committerCommit Bot <commit-bot@chromium.org>2020-09-11 00:33:32 +0000
commit56618fa0256003920c0c714048b3121b0fc643af (patch)
tree3b565fc135d5f97e3ed5399e43e6c19ab0a7b3d8 /include
parent791c0ac14a8d3679b8c284cf9ecc294d23666bad (diff)
downloadchrome-ec-56618fa0256003920c0c714048b3121b0fc643af.tar.gz
TCPMv2: Obtain correct dual role state when going suspend
Some boards (eg. eve) don't source VBUS in S3 state. In this case DRP state should be set to force sink instead of toggle off. This CL introduces pd_get_drp_state_in_suspend() function and uses it to obtain correct DRP state when entering suspend. Default implementation of pd_get_drp_state_in_suspend() returns PD_DRP_TOGGLE_OFF, so this commit introduces no functional changes. BUG=b:162254118 BRANCH=none TEST=No functional changes in this CL make -j buildall Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Iacf8fcdbad027563015f593653d3ed8a49752131 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2395558 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb_pd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index b546a286f4..e013779106 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -1572,6 +1572,14 @@ __override_proto void pd_execute_data_swap(int port,
enum pd_data_role data_role);
/**
+ * Get desired dual role state when chipset is suspended.
+ * Under some circumstances we are not allowed to be source
+ * during suspend. This function should return appropriate state.
+ */
+
+__override_proto enum pd_dual_role_states pd_get_drp_state_in_suspend(void);
+
+/**
* Get PD device info used for VDO_CMD_SEND_INFO / VDO_CMD_READ_INFO
*
* @param info_data pointer to info data array