summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/host_command_pd.c2
-rw-r--r--common/keyboard_scan.c2
-rw-r--r--include/host_command.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/common/host_command_pd.c b/common/host_command_pd.c
index c3fc385216..831b6159bc 100644
--- a/common/host_command_pd.c
+++ b/common/host_command_pd.c
@@ -225,7 +225,7 @@ void pd_command_task(void)
}
}
-#ifdef USB_TCPM_WITH_OFF_CHIP_TCPC
+#if defined(USB_TCPM_WITH_OFF_CHIP_TCPC) && defined(CONFIG_HOSTCMD_EVENTS)
/*
* PD host event status for host command
* Note: this variable must be aligned on 4-byte boundary because we pass the
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index e7f42d47a7..dd97e7f757 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -638,12 +638,14 @@ void keyboard_scan_init(void)
if (boot_key_value & ~(BOOT_KEY_ESC | BOOT_KEY_LEFT_SHIFT))
return;
+#ifdef CONFIG_HOSTCMD_EVENTS
if (boot_key_value & BOOT_KEY_ESC) {
host_set_single_event(EC_HOST_EVENT_KEYBOARD_RECOVERY);
if (boot_key_value & BOOT_KEY_LEFT_SHIFT)
host_set_single_event(
EC_HOST_EVENT_KEYBOARD_RECOVERY_HW_REINIT);
}
+#endif
}
void keyboard_scan_task(void)
diff --git a/include/host_command.h b/include/host_command.h
index 9df4689f24..720492158e 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -131,6 +131,7 @@ uint8_t *host_get_memmap(int offset);
*/
enum ec_status host_command_process(struct host_cmd_handler_args *args);
+#ifdef CONFIG_HOSTCMD_EVENTS
/**
* Set one or more host event bits.
*
@@ -160,6 +161,7 @@ void host_clear_events(uint32_t mask);
* Return the raw event state.
*/
uint32_t host_get_events(void);
+#endif
/**
* Send a response to the relevant driver for transmission