summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/host_event_commands.c22
-rw-r--r--include/config.h4
2 files changed, 7 insertions, 19 deletions
diff --git a/common/host_event_commands.c b/common/host_event_commands.c
index 1dc9ac5c0c..0364474de0 100644
--- a/common/host_event_commands.c
+++ b/common/host_event_commands.c
@@ -40,14 +40,9 @@ uint32_t host_get_events(void)
void host_set_events(uint32_t mask)
{
- /* ignore host events the rest of board doesn't care about */
- mask &= CONFIG_HOST_EVENT_REPORT_MASK;
-
- /* exit now if nothing has changed */
- if (!((events & mask) != mask || (events_copy_b & mask) != mask))
- return;
-
- CPRINTS("event set 0x%08x", mask);
+ /* Only print if something's about to change */
+ if ((events & mask) != mask || (events_copy_b & mask) != mask)
+ CPRINTS("event set 0x%08x", mask);
atomic_or(&events, mask);
atomic_or(&events_copy_b, mask);
@@ -67,14 +62,9 @@ void host_set_events(uint32_t mask)
void host_clear_events(uint32_t mask)
{
- /* ignore host events the rest of board doesn't care about */
- mask &= CONFIG_HOST_EVENT_REPORT_MASK;
-
- /* return early if nothing changed */
- if (!(events & mask))
- return;
-
- CPRINTS("event clear 0x%08x", mask);
+ /* Only print if something's about to change */
+ if (events & mask)
+ CPRINTS("event clear 0x%08x", mask);
atomic_clear(&events, mask);
diff --git a/include/config.h b/include/config.h
index ccf4f2c84b..415cba7b21 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1261,6 +1261,7 @@
#undef CONFIG_GESTURE_SIGMO_EVENT
+
/* Do we want to detect the lid angle? */
#undef CONFIG_LID_ANGLE
@@ -1327,9 +1328,6 @@
*/
#undef CONFIG_HOST_COMMAND_STATUS
-/* clear bit(s) to mask reporting of an EC_HOST_EVENT_XXX event(s) */
-#define CONFIG_HOST_EVENT_REPORT_MASK 0xffffffff
-
/*
* The host commands are sorted in the .rodata.hcmds section so use the binary
* search algorithm to match a command to its handler