summaryrefslogtreecommitdiff
path: root/include/usb_mux.h
diff options
context:
space:
mode:
authorli feng <li1.feng@intel.com>2021-01-26 21:03:56 -0800
committerCommit Bot <commit-bot@chromium.org>2021-02-05 17:54:00 +0000
commitf529543ee11ef105b904deaba9c7a8c0f5d76454 (patch)
treea2db787c00aaf676641d6c30e5f9445e8f04711d /include/usb_mux.h
parent8ef0b2b959ef21d66ca450a31f633fc1f9dfd32f (diff)
downloadchrome-ec-f529543ee11ef105b904deaba9c7a8c0f5d76454.tar.gz
retimer: PD port retimer firmware update support
Added one field to struct usb_mux_driver, which returns true if retimer update is supported. Moved query function from usb_retimer_fw_update.c to usb_mux.c. BUG=b:162528867 BRANCH=none TEST=Tested on Voxel, together with related coreboot and kernel changes. EC returns correct port information to kernel. Signed-off-by: li feng <li1.feng@intel.com> Change-Id: I5cab34a14adbf0470cffe6a13234ad53b6f6a90c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2651866 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/usb_mux.h')
-rw-r--r--include/usb_mux.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/usb_mux.h b/include/usb_mux.h
index cb50497ef7..4391eed1e8 100644
--- a/include/usb_mux.h
+++ b/include/usb_mux.h
@@ -58,6 +58,14 @@ struct usb_mux_driver {
int (*get)(const struct usb_mux *me, mux_state_t *mux_state);
/**
+ * Return if retimer supports firmware update
+ *
+ * @return true - supported
+ * false - not supported
+ */
+ bool (*is_retimer_fw_update_capable)(void);
+
+ /**
* Optional method that is called after the mux fully disconnects.
*
* Note: this method does not need to be defined for TCPC/MUX combos
@@ -242,6 +250,17 @@ void usb_mux_flip(int port);
void usb_mux_hpd_update(int port, int hpd_lvl, int hpd_irq);
/**
+ * Port information about retimer firmware update support.
+ *
+ * @return which ports support retimer firmware update
+ * Bits[7:0]: represent PD ports 0-7;
+ * each bit
+ * = 1, this port supports retimer firmware update;
+ * = 0, not support.
+ */
+int usb_mux_retimer_fw_update_port_info(void);
+
+/**
* Get the disconnect latch flag so that the Kernel Mux driver doesn't
* miss the unnoticed disconnection status.
*