summaryrefslogtreecommitdiff
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorPrashant Malani <pmalani@chromium.org>2023-01-26 23:55:45 +0300
committerPrashant Malani <pmalani@chromium.org>2023-01-31 21:12:18 +0300
commit4b1936cd081496865151eaab539f767240952306 (patch)
tree1253e25cf21c6c38e9b62b9b9e0ea44592fc74f9 /include/linux/platform_data
parent478f32ab4daae8a9bae3723d1040c6e4e3a09bc5 (diff)
downloadlinux-4b1936cd081496865151eaab539f767240952306.tar.xz
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 <pmalani@chromium.org> [pmalani: Removed extra tab in header #define] Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20230126205620.3714994-1-pmalani@chromium.org
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/cros_ec_commands.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h
index b9c4a3964247..b3b3df163efc 100644
--- a/include/linux/platform_data/cros_ec_commands.h
+++ b/include/linux/platform_data/cros_ec_commands.h
@@ -5862,6 +5862,7 @@ enum tcpc_cc_polarity {
#define PD_STATUS_EVENT_MUX_1_SET_DONE BIT(5)
#define PD_STATUS_EVENT_VDM_REQ_REPLY BIT(6)
#define PD_STATUS_EVENT_VDM_REQ_FAILED BIT(7)
+#define PD_STATUS_EVENT_VDM_ATTENTION BIT(8)
struct ec_params_typec_status {
uint8_t port;
@@ -5906,7 +5907,8 @@ struct ec_response_typec_status {
} __ec_align1;
/*
- * Gather the response to the most recent VDM REQ from the AP
+ * Gather the response to the most recent VDM REQ from the AP, as well
+ * as popping the oldest VDM:Attention from the DPM queue
*/
#define EC_CMD_TYPEC_VDM_RESPONSE 0x013C
@@ -5919,10 +5921,18 @@ struct ec_response_typec_vdm_response {
uint8_t vdm_data_objects;
/* Partner to address - see enum typec_partner_type */
uint8_t partner_type;
- /* Reserved */
- uint16_t reserved;
+ /* enum ec_status describing VDM response */
+ uint16_t vdm_response_err;
/* VDM data, including VDM header */
uint32_t vdm_response[VDO_MAX_SIZE];
+ /* Number of 32-bit Attention fields filled in */
+ uint8_t vdm_attention_objects;
+ /* Number of remaining messages to consume */
+ uint8_t vdm_attention_left;
+ /* Reserved */
+ uint16_t reserved1;
+ /* VDM:Attention contents */
+ uint32_t vdm_attention[2];
} __ec_align1;
#undef VDO_MAX_SIZE