diff options
author | Enrico Granata <egranata@chromium.org> | 2018-10-02 16:39:56 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-04 17:09:11 -0700 |
commit | ce110598773fca8ef888e3a40f3e433da78e75a7 (patch) | |
tree | 1646a42f5ceec7ccb9a991779c774e3a518b02ab /include | |
parent | 27fcbd8d998e21b5bcb4250b4a1ea72c27f15944 (diff) | |
download | chrome-ec-ce110598773fca8ef888e3a40f3e433da78e75a7.tar.gz |
FIXUP: mkbp: add support for board-specific host notification
This patch improves naming and documentation for the functionality
introduced in crrev.com/c/1247000
TEST=build
BRANCH=none
BUG=b:112366846, b:112112483, b:112111610
Change-Id: Iedd2fc5492a5d35fa9c2475fe248c5aa41e83bb0
Signed-off-by: Enrico Granata <egranata@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1258562
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/mkbp_event.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/include/mkbp_event.h b/include/mkbp_event.h index 3639ffb326..61eb2c9052 100644 --- a/include/mkbp_event.h +++ b/include/mkbp_event.h @@ -28,8 +28,34 @@ extern uint32_t mkbp_last_event_time; */ int mkbp_send_event(uint8_t event_type); -void send_mkbp_event_gpio(int active); -void send_mkbp_event_host(int active); +/* + * Set MKBP active event status on the AP. + * + * This communicates to the AP whether an MKBP event is currently available + * for processing. It is used by mkbp_send_event(). + * + * The default implementation in mkbp_event.c has weak linkage and can be + * overridden by individual boards depending on their hardware configuration. + * + * @param active 1 if there is an event, 0 otherwise + */ +void mkbp_set_host_active(int active); + +/* + * Communicate an MKBP event to the host via a dedicated GPIO pin. + * + * This can be used if the board schematic has a pin reserved for this purpose. + */ +void mkbp_set_host_active_via_gpio(int active); + +/* + * Communicate an MKBP event to the AP via EC_HOST_EVENT. + * + * This can be used without a dedicated interrupt pin configured. It is the + * default behavior of mkbp_set_host_active when CONFIG_MKBP_USE_HOST_EVENT + * is defined in board.h. + */ +void mkbp_set_host_active_via_event(int active); /* * The struct to store the event source definition. The get_data routine is |