From c95e0eaef93d9a3c640cdfddb3fe11b08be6ca15 Mon Sep 17 00:00:00 2001 From: Diana Z Date: Wed, 12 Oct 2022 15:23:44 -0600 Subject: Features: Add feature flag to advertise AP VDM control Add a feature flag so the AP can know that this system is capable of letting the AP compose VDMs to send to a port partner. BRANCH=None BUG=b:208884535 TEST=CQ+1 Signed-off-by: Diana Z Change-Id: I2adf73307e6d003246d9b61c83a2655ba01336a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3953479 Reviewed-by: Abe Levkoy Code-Coverage: Zoss --- common/ec_features.c | 3 +++ include/ec_commands.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/common/ec_features.c b/common/ec_features.c index a45204b7a1..6778a3b36a 100644 --- a/common/ec_features.c +++ b/common/ec_features.c @@ -153,6 +153,9 @@ uint32_t get_feature_flags1(void) #endif #ifdef CONFIG_USB_MUX_AP_CONTROL | EC_FEATURE_MASK_1(EC_FEATURE_TYPEC_AP_MUX_SET) +#endif +#ifdef CONFIG_USB_PD_VDM_AP_CONTROL + | EC_FEATURE_MASK_1(EC_FEATURE_TYPEC_AP_VDM_SEND) #endif ; return board_override_feature_flags1(result); diff --git a/include/ec_commands.h b/include/ec_commands.h index 7bb1f2b3d9..acb502ca99 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1579,6 +1579,10 @@ enum ec_feature_code { * The EC supports the AP directing mux sets for the board. */ EC_FEATURE_TYPEC_AP_MUX_SET = 45, + /* + * The EC supports the AP composing VDMs for us to send. + */ + EC_FEATURE_TYPEC_AP_VDM_SEND = 46, }; #define EC_FEATURE_MASK_0(event_code) BIT(event_code % 32) -- cgit v1.2.1