Skip to content

Commit 4b1936c

Browse files
author
Prashant Malani
committed
platform/chrome: cros_ec: Add VDM attention headers
Incorporate updates to the EC headers to support the retrieval of VDM Attention messages from port partners. These headers are already present in the ChromeOS EC codebase. [1] [1] https://source.chromium.org/chromium/chromiumos/platform/ec/+/main:include/ec_commands.h Signed-off-by: Prashant Malani <[email protected]> [pmalani: Removed extra tab in header #define] Reviewed-by: Benson Leung <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 478f32a commit 4b1936c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

include/linux/platform_data/cros_ec_commands.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5862,6 +5862,7 @@ enum tcpc_cc_polarity {
58625862
#define PD_STATUS_EVENT_MUX_1_SET_DONE BIT(5)
58635863
#define PD_STATUS_EVENT_VDM_REQ_REPLY BIT(6)
58645864
#define PD_STATUS_EVENT_VDM_REQ_FAILED BIT(7)
5865+
#define PD_STATUS_EVENT_VDM_ATTENTION BIT(8)
58655866

58665867
struct ec_params_typec_status {
58675868
uint8_t port;
@@ -5906,7 +5907,8 @@ struct ec_response_typec_status {
59065907
} __ec_align1;
59075908

59085909
/*
5909-
* Gather the response to the most recent VDM REQ from the AP
5910+
* Gather the response to the most recent VDM REQ from the AP, as well
5911+
* as popping the oldest VDM:Attention from the DPM queue
59105912
*/
59115913
#define EC_CMD_TYPEC_VDM_RESPONSE 0x013C
59125914

@@ -5919,10 +5921,18 @@ struct ec_response_typec_vdm_response {
59195921
uint8_t vdm_data_objects;
59205922
/* Partner to address - see enum typec_partner_type */
59215923
uint8_t partner_type;
5922-
/* Reserved */
5923-
uint16_t reserved;
5924+
/* enum ec_status describing VDM response */
5925+
uint16_t vdm_response_err;
59245926
/* VDM data, including VDM header */
59255927
uint32_t vdm_response[VDO_MAX_SIZE];
5928+
/* Number of 32-bit Attention fields filled in */
5929+
uint8_t vdm_attention_objects;
5930+
/* Number of remaining messages to consume */
5931+
uint8_t vdm_attention_left;
5932+
/* Reserved */
5933+
uint16_t reserved1;
5934+
/* VDM:Attention contents */
5935+
uint32_t vdm_attention[2];
59265936
} __ec_align1;
59275937

59285938
#undef VDO_MAX_SIZE

0 commit comments

Comments
 (0)