summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ec/google/chromeec/Makefile.inc2
-rw-r--r--src/ec/google/chromeec/usbc_mux.c19
2 files changed, 20 insertions, 1 deletions
diff --git a/src/ec/google/chromeec/Makefile.inc b/src/ec/google/chromeec/Makefile.inc
index cb3b97e610..23e7b3d479 100644
--- a/src/ec/google/chromeec/Makefile.inc
+++ b/src/ec/google/chromeec/Makefile.inc
@@ -20,7 +20,7 @@ endif
bootblock-y += ec.c
bootblock-$(CONFIG_EC_GOOGLE_CHROMEEC_LPC) += ec_lpc.c
-ramstage-y += ec.c crosec_proto.c vstore.c
+ramstage-y += ec.c crosec_proto.c vstore.c usbc_mux.c
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_I2C) += ec_i2c.c
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_LPC) += ec_lpc.c
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_SPI) += ec_spi.c
diff --git a/src/ec/google/chromeec/usbc_mux.c b/src/ec/google/chromeec/usbc_mux.c
new file mode 100644
index 0000000000..64195428b0
--- /dev/null
+++ b/src/ec/google/chromeec/usbc_mux.c
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <ec/google/chromeec/ec.h>
+
+static const struct usbc_ops google_chromeec_usbc_ops = {
+ .mux_ops = {
+ .get_mux_info = google_chromeec_get_usbc_mux_info,
+ },
+ .dp_ops = {
+ .wait_for_connection = google_chromeec_wait_for_displayport,
+ .enter_dp_mode = google_chromeec_typec_control_enter_dp_mode,
+ .wait_for_hpd = google_chromeec_wait_for_dp_hpd,
+ },
+};
+
+const struct usbc_ops *usbc_get_ops(void)
+{
+ return &google_chromeec_usbc_ops;
+}