diff options
author | Boris Mittelberg <bmbm@google.com> | 2021-03-30 19:41:07 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-10 22:34:45 +0000 |
commit | 3a2f77758104a581ade2ecb406b8d099eada6a90 (patch) | |
tree | e1e958329a24189d8ee5fe0120632e4b03682a94 /common/mkbp_info.c | |
parent | ddf11157cd952a6df79aefc06c456eea426b6f10 (diff) | |
download | chrome-ec-3a2f77758104a581ade2ecb406b8d099eada6a90.tar.gz |
mkbp: EC buttons and switches via MKBP
Allowing EC buttons and switches to be signaled via MKBP protocol, using
CONFIG_MKBP_INPUT_DEVICES. Default behaviour is unchanged.
BUG=b:170966461
BRANCH=main,firmware-dedede-13606.B,firmware-volteer-13672.B-main
TEST=None
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Cq-Depend: chromium:2824044
Change-Id: Ib96f98ecb3717a8ee8963be69fb7d7eb72e6d132
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2796382
Diffstat (limited to 'common/mkbp_info.c')
-rw-r--r-- | common/mkbp_info.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/mkbp_info.c b/common/mkbp_info.c index f31852abca..b3835367cf 100644 --- a/common/mkbp_info.c +++ b/common/mkbp_info.c @@ -12,6 +12,7 @@ #include "keyboard_config.h" #include "keyboard_mkbp.h" #include "keyboard_scan.h" +#include "mkbp_input_devices.h" #include "util.h" static uint32_t get_supported_buttons(void) @@ -116,6 +117,7 @@ static enum ec_status mkbp_get_info(struct host_cmd_handler_args *args) break; #endif +#ifdef CONFIG_MKBP_INPUT_DEVICES case EC_MKBP_EVENT_BUTTON: r->buttons = mkbp_get_button_state(); args->response_size = sizeof(r->buttons); @@ -125,6 +127,7 @@ static enum ec_status mkbp_get_info(struct host_cmd_handler_args *args) r->switches = mkbp_get_switch_state(); args->response_size = sizeof(r->switches); break; +#endif /* CONFIG_MKBP_INPUT_DEVICES */ default: /* Doesn't make sense for other event types. */ |