summaryrefslogtreecommitdiff
path: root/include/usb_mux.h
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-10-18 15:27:01 -0600
committerCommit Bot <commit-bot@chromium.org>2021-12-02 23:09:27 +0000
commit18f6c4d3b2a56635ce880788047083115637885c (patch)
treec735046c4f418c6addfd2c6228252a81388f8b4f /include/usb_mux.h
parent5175aa6b6d38c1819e3820d889d8f02d7226fac1 (diff)
downloadchrome-ec-18f6c4d3b2a56635ce880788047083115637885c.tar.gz
USB MUX: Wait on ACK for HPD changes when required
In order to correctly sequence HPD sets with the AP, allow the HPD set to wait on an ACK from the AP before proceeding. BRANCH=None BUG=b:202137658 TEST=on brya, validate retimer and virtual mux are kept in sync as expected Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I368c3290b69d627829a70847876d7b47a8c36948 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3232293 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include/usb_mux.h')
-rw-r--r--include/usb_mux.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/usb_mux.h b/include/usb_mux.h
index 41e5881a81..e251d74f4c 100644
--- a/include/usb_mux.h
+++ b/include/usb_mux.h
@@ -139,12 +139,15 @@ struct usb_mux {
* USB Type-C DP alt mode support. Notify Type-C controller
* there is DP dongle hot-plug.
*
- * @param me usb_mux
- * @param mux_state with HPD IRQ and HPD LVL flags set
- * accordingly
+ * @param[in] me usb_mux
+ * @param[in] mux_state with HPD IRQ and HPD LVL flags set
+ * accordingly
+ * @param[out] ack_required: indication of whether this function
+ * requires a wait for an AP ACK after
*/
void (*hpd_update)(const struct usb_mux *me,
- mux_state_t mux_state);
+ mux_state_t mux_state,
+ bool *ack_required);
};
/* Supported USB mux drivers */
@@ -168,7 +171,8 @@ extern const struct usb_mux usb_muxes[];
#endif
/* Supported hpd_update functions */
-void virtual_hpd_update(const struct usb_mux *me, mux_state_t mux_state);
+void virtual_hpd_update(const struct usb_mux *me, mux_state_t mux_state,
+ bool *ack_required);
/*
* Helper methods that either use tcpc communication or direct i2c