diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c index 6839cef707..277e63dc03 100644 --- a/common/keyboard_mkbp.c +++ b/common/keyboard_mkbp.c @@ -411,12 +411,13 @@ static int mkbp_get_info(struct host_cmd_handler_args *args) case EC_MKBP_INFO_CURRENT: switch (p->event_type) { +#ifdef HAS_TASK_KEYSCAN case EC_MKBP_EVENT_KEY_MATRIX: memcpy(r->key_matrix, keyboard_scan_get_state(), sizeof(r->key_matrix)); args->response_size = sizeof(r->key_matrix); break; - +#endif case EC_MKBP_EVENT_HOST_EVENT: r->host_event = host_get_events(); args->response_size = sizeof(r->host_event); @@ -448,6 +449,7 @@ static int mkbp_get_info(struct host_cmd_handler_args *args) DECLARE_HOST_COMMAND(EC_CMD_MKBP_INFO, mkbp_get_info, EC_VER_MASK(0) | EC_VER_MASK(1)); +#ifdef HAS_TASK_KEYSCAN static void set_keyscan_config(const struct ec_mkbp_config *src, struct ec_mkbp_protocol_config *dst, uint32_t valid_mask, uint8_t new_flags) @@ -570,3 +572,4 @@ static int host_command_mkbp_get_config(struct host_cmd_handler_args *args) DECLARE_HOST_COMMAND(EC_CMD_MKBP_GET_CONFIG, host_command_mkbp_get_config, EC_VER_MASK(0)); +#endif /* HAS_TASK_KEYSCAN */ diff --git a/include/config.h b/include/config.h index 4f4cf29323..3b452b5a47 100644 --- a/include/config.h +++ b/include/config.h @@ -2636,11 +2636,6 @@ */ #endif -#ifndef HAS_TASK_KEYSCAN -#undef CONFIG_KEYBOARD_PROTOCOL_8042 -#undef CONFIG_KEYBOARD_PROTOCOL_MKBP -#endif - #ifndef HAS_TASK_PDCMD #undef CONFIG_HOSTCMD_PD #endif