diff options
-rw-r--r-- | common/keyboard_mkbp.c | 2 | ||||
-rw-r--r-- | common/system.c | 2 | ||||
-rw-r--r-- | include/config.h | 5 | ||||
-rw-r--r-- | include/ec_commands.h | 5 | ||||
-rw-r--r-- | include/host_command.h | 8 | ||||
-rw-r--r-- | include/system.h | 8 |
6 files changed, 18 insertions, 12 deletions
diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c index e592addf2f..204268e76f 100644 --- a/common/keyboard_mkbp.c +++ b/common/keyboard_mkbp.c @@ -260,7 +260,7 @@ void keyboard_update_button(enum keyboard_button_type button, int is_pressed) } #ifdef CONFIG_EMULATED_SYSRQ -void send_sysrq(uint8_t key) +void host_send_sysrq(uint8_t key) { uint32_t value = key; diff --git a/common/system.c b/common/system.c index 2ddcd570c2..25ba9dea2c 100644 --- a/common/system.c +++ b/common/system.c @@ -1126,7 +1126,7 @@ static int command_sysrq(int argc, char **argv) if (argc > 1 && argv[1]) key = argv[1][0]; - send_sysrq(key); + host_send_sysrq(key); return EC_SUCCESS; } diff --git a/include/config.h b/include/config.h index d3c661e52f..27afcbfb48 100644 --- a/include/config.h +++ b/include/config.h @@ -923,7 +923,10 @@ /* Support EC chip internal data EEPROM */ #undef CONFIG_EEPROM -/* Support for sending emulated sysrq commands to AP */ +/* + * Support for sending emulated sysrq events to AP (on designs with a keyboard, + * sysrq is passed as normal key presses). + */ #undef CONFIG_EMULATED_SYSRQ /* Support for eSPI for host communication */ diff --git a/include/ec_commands.h b/include/ec_commands.h index d10fca9df5..2e331637a1 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2797,7 +2797,10 @@ enum ec_mkbp_event { /* New Fingerprint sensor event, the event data is fp_events bitmap. */ EC_MKBP_EVENT_FINGERPRINT = 5, - /* Sysrq event */ + /* + * Sysrq event: send emulated sysrq. The event data is sysrq, + * corresponding to the key to be pressed. + */ EC_MKBP_EVENT_SYSRQ = 6, /* Number of MKBP events */ diff --git a/include/host_command.h b/include/host_command.h index acaa2a4f6b..aff1d1b8b5 100644 --- a/include/host_command.h +++ b/include/host_command.h @@ -281,4 +281,12 @@ int pd_host_command(int command, int version, */ int host_get_vboot_mode(void); +/* + * Sends an emulated sysrq to the host, used by button-based debug mode. + * Only implemented on top of MKBP protocol. + * + * @param key Key to be sent (e.g. 'x') + */ +void host_send_sysrq(uint8_t key); + #endif /* __CROS_EC_HOST_COMMAND_H */ diff --git a/include/system.h b/include/system.h index 32a544db49..26a57d9d61 100644 --- a/include/system.h +++ b/include/system.h @@ -507,12 +507,4 @@ uintptr_t system_get_fw_reset_vector(uintptr_t base); */ int system_is_reboot_warm(void); -/* - * Sends an emulated sysrq to the host, used by button-based debug mode. - * Only implemented on top of MKBP protocol. - * - * @param key Key to be sent (e.g. 'x') - */ -void send_sysrq(uint8_t key); - #endif /* __CROS_EC_SYSTEM_H */ |