diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h index 19a68e4867..b0cc958286 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -24,6 +24,7 @@ #undef CONFIG_CONSOLE_CMDHELP #define CONFIG_FORCE_CONSOLE_RESUME #define CONFIG_HIBERNATE_WAKEUP_PINS (STM32_PWR_CSR_EWUP3|STM32_PWR_CSR_EWUP8) +#undef CONFIG_HOSTCMD_EVENTS #define CONFIG_HW_CRC #define CONFIG_I2C #undef CONFIG_LID_SWITCH diff --git a/common/build.mk b/common/build.mk index e304756895..97e270f8f7 100644 --- a/common/build.mk +++ b/common/build.mk @@ -45,6 +45,8 @@ common-$(CONFIG_EXTPOWER_SPRING)+=extpower_spring.o common-$(CONFIG_FANS)+=fan.o common-$(CONFIG_FLASH)+=flash.o common-$(CONFIG_FMAP)+=fmap.o +common-$(CONFIG_GESTURE_DETECTION)+=gesture.o +common-$(CONFIG_HOSTCMD_EVENTS)+=host_event_commands.o common-$(CONFIG_I2C)+=i2c.o common-$(CONFIG_I2C_ARBITRATION)+=i2c_arbitration.o common-$(CONFIG_INDUCTIVE_CHARGING)+=inductive_charging.o @@ -52,6 +54,7 @@ common-$(CONFIG_KEYBOARD_PROTOCOL_8042)+=keyboard_8042.o common-$(CONFIG_KEYBOARD_PROTOCOL_MKBP)+=keyboard_mkbp.o common-$(CONFIG_KEYBOARD_TEST)+=keyboard_test.o common-$(CONFIG_LED_COMMON)+=led_common.o +common-$(CONFIG_LID_ANGLE)+=motion_lid.o common-$(CONFIG_LID_ANGLE_KEY_SCAN)+=lid_angle.o common-$(CONFIG_LID_SWITCH)+=lid_switch.o common-$(CONFIG_LPC)+=acpi.o port80.o @@ -80,11 +83,9 @@ common-$(CONFIG_WIRELESS)+=wireless.o common-$(HAS_TASK_CHIPSET)+=chipset.o common-$(HAS_TASK_CONSOLE)+=console.o console_output.o uart_buffering.o common-$(HAS_TASK_CONSOLE)+=memory_commands.o -common-$(HAS_TASK_HOSTCMD)+=host_command.o host_event_commands.o +common-$(HAS_TASK_HOSTCMD)+=host_command.o common-$(HAS_TASK_PDCMD)+=host_command_master.o host_command_pd.o common-$(HAS_TASK_KEYSCAN)+=keyboard_scan.o common-$(HAS_TASK_LIGHTBAR)+=lb_common.o lightbar.o common-$(HAS_TASK_MOTIONSENSE)+=motion_sense.o math_util.o -common-$(CONFIG_GESTURE_DETECTION)+=gesture.o -common-$(CONFIG_LID_ANGLE)+=motion_lid.o common-$(TEST_BUILD)+=test_util.o diff --git a/common/host_command.c b/common/host_command.c index de570284f6..6a1ab2d6ff 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -379,8 +379,10 @@ static void host_command_init(void) *host_get_memmap(EC_MEMMAP_ID_VERSION) = 1; *host_get_memmap(EC_MEMMAP_EVENTS_VERSION) = 1; +#ifdef CONFIG_HOSTCMD_EVENTS host_set_single_event(EC_HOST_EVENT_INTERFACE_READY); CPRINTS("hostcmd init 0x%x", host_get_events()); +#endif } void host_command_task(void) diff --git a/include/config.h b/include/config.h index c1f2b24198..c4b07090c1 100644 --- a/include/config.h +++ b/include/config.h @@ -611,6 +611,13 @@ */ #undef CONFIG_HOSTCMD_I2C_SLAVE_ADDR +/* If we have host command task, assume we also are using host events. */ +#ifdef HAS_TASK_HOSTCMD +#define CONFIG_HOSTCMD_EVENTS +#else +#undef CONFIG_HOSTCMD_EVENTS +#endif + /*****************************************************************************/ /* Enable debugging and profiling statistics for hook functions */