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>
This commit is contained in:
Derek Huang 2021-09-30 21:20:02 +08:00 committed by Tim Wawrzynczak
parent 796ea820f2
commit 1a368769b9
2 changed files with 20 additions and 1 deletions

View File

@ -20,7 +20,7 @@ endif
bootblock-y += ec.c bootblock-y += ec.c
bootblock-$(CONFIG_EC_GOOGLE_CHROMEEC_LPC) += ec_lpc.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_I2C) += ec_i2c.c
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_LPC) += ec_lpc.c ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_LPC) += ec_lpc.c
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_SPI) += ec_spi.c ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC_SPI) += ec_spi.c

View File

@ -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;
}