diff options
author | Stefan Adolfsson <sadolfsson@chromium.org> | 2018-05-16 15:21:00 +0000 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-16 16:43:03 -0700 |
commit | 86734119fcba3909f02ab294ae3b2b31540c17a7 (patch) | |
tree | ac97b734ab1bd052da058013e3f262b0b63e734e /include/ec_commands.h | |
parent | e16963ce25831f796acabcfaa870335876a14941 (diff) | |
download | chrome-ec-86734119fcba3909f02ab294ae3b2b31540c17a7.tar.gz |
Reland "npcx: CEC: Send CEC message in mkbp event"
This reverts commit f139d3a0ca9215b5b5bb2abc1f120ff6171036c9.
Reason for revert: Verified that the problem is in the kernel, not EC.
Original change's description:
> Revert "npcx: CEC: Send CEC message in mkbp event"
>
> This reverts commit 74b5a2ccb58739d4e21fdeb36e40fe01c0ca7ede.
>
> Suspected to have broken perf tests by keeping a CPU busy on kevin/bob.
>
> BUG=chromium:842873, b:76467407
>
> Change-Id: Iebbbb4623116840b851656e3ec28e75dc99cff79
> Reviewed-on: https://chromium-review.googlesource.com/1060073
> Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
> Tested-by: Ilja H. Friedel <ihf@chromium.org>
Bug: chromium:842873, b:76467407
Change-Id: I7d8990b2b8901b7de08f190a993bec645bbdacd2
Reviewed-on: https://chromium-review.googlesource.com/1061854
Commit-Ready: Stefan Adolfsson <sadolfsson@chromium.org>
Tested-by: Stefan Adolfsson <sadolfsson@chromium.org>
Reviewed-by: Stefan Adolfsson <sadolfsson@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r-- | include/ec_commands.h | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index ac844c1106..629d746bcf 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -21,6 +21,10 @@ #include "common.h" #endif +#if !defined(__KERNEL__) +#include "compile_time_macros.h" +#endif + /* * Current version of this protocol * @@ -3174,7 +3178,10 @@ enum ec_mkbp_event { EC_MKBP_EVENT_HOST_EVENT64 = 7, /* Notify the AP that something happened on CEC */ - EC_MKBP_EVENT_CEC = 8, + EC_MKBP_EVENT_CEC_EVENT = 8, + + /* Send an incoming CEC message to the AP */ + EC_MKBP_EVENT_CEC_MESSAGE = 9, /* Number of MKBP events */ EC_MKBP_EVENT_COUNT, @@ -3205,12 +3212,46 @@ union __ec_align_offset1 ec_response_get_next_data { uint32_t cec_events; }; +union __ec_align_offset1 ec_response_get_next_data_v1 { + uint8_t key_matrix[16]; + + /* Unaligned */ + uint32_t host_event; + uint64_t host_event64; + + struct __ec_todo_unpacked { + /* For aligning the fifo_info */ + uint8_t reserved[3]; + struct ec_response_motion_sense_fifo_info info; + } sensor_fifo; + + uint32_t buttons; + + uint32_t switches; + + uint32_t fp_events; + + uint32_t sysrq; + + /* CEC events from enum mkbp_cec_event */ + uint32_t cec_events; + + uint8_t cec_message[16]; +}; +BUILD_ASSERT(sizeof(union ec_response_get_next_data_v1) == 16); + struct __ec_align1 ec_response_get_next_event { uint8_t event_type; /* Followed by event data if any */ union ec_response_get_next_data data; }; +struct __ec_align1 ec_response_get_next_event_v1 { + uint8_t event_type; + /* Followed by event data if any */ + union ec_response_get_next_data_v1 data; +}; + /* Bit indices for buttons and switches.*/ /* Buttons */ #define EC_MKBP_POWER_BUTTON 0 @@ -4117,14 +4158,6 @@ struct __ec_align1 ec_params_cec_write { uint8_t msg[MAX_CEC_MSG_LEN]; }; -/* CEC message from a CEC sink reported back to the AP */ -#define EC_CMD_CEC_READ_MSG 0x00B9 - -/* Message read from to the CEC bus */ -struct __ec_align1 ec_response_cec_read { - uint8_t msg[MAX_CEC_MSG_LEN]; -}; - /* Set various CEC parameters */ #define EC_CMD_CEC_SET 0x00BA @@ -4157,8 +4190,6 @@ enum mkbp_cec_event { EC_MKBP_CEC_SEND_OK = 1 << 0, /* Outgoing message was not acknowledged */ EC_MKBP_CEC_SEND_FAILED = 1 << 1, - /* Incoming message can be read out by AP */ - EC_MKBP_CEC_HAVE_DATA = 1 << 2, }; /*****************************************************************************/ |