diff options
author | Derek Huang <derek.huang@intel.corp-partner.google.com> | 2021-09-30 21:20:02 +0800 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2021-10-06 22:20:32 +0000 |
commit | 1a368769b905ff5ed2a2ca9ddc1c473f8a2b44ad (patch) | |
tree | e05d9a111850b16ba1bbf341bbf94155c6b8fd8b /src | |
parent | 796ea820f2f97546775917b8a80d602bb7361740 (diff) |
ec/google/chromeec: Register USB-C mux operations
Register USB-C mux operations to the generic interface.
BUG=b:192947843
Signed-off-by: Derek Huang <derek.huang@intel.corp-partner.google.com>
Change-Id: I576c9e4c6c82d6b4055b0a0a9a75c677d4b05220
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58061
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/chromeec/Makefile.inc | 2 | ||||
-rw-r--r-- | src/ec/google/chromeec/usbc_mux.c | 19 |
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; +} |