summaryrefslogtreecommitdiff
path: root/common/lid_switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/lid_switch.c')
-rw-r--r--common/lid_switch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/lid_switch.c b/common/lid_switch.c
index eef4ccb045..2851a53f77 100644
--- a/common/lid_switch.c
+++ b/common/lid_switch.c
@@ -53,7 +53,9 @@ static void lid_switch_open(void)
CPRINTS("lid open");
debounced_lid_open = 1;
hook_notify(HOOK_LID_CHANGE);
+#ifdef CONFIG_HOSTCMD_EVENTS
host_set_single_event(EC_HOST_EVENT_LID_OPEN);
+#endif
}
/**
@@ -69,7 +71,9 @@ static void lid_switch_close(void)
CPRINTS("lid close");
debounced_lid_open = 0;
hook_notify(HOOK_LID_CHANGE);
+#ifdef CONFIG_HOSTCMD_EVENTS
host_set_single_event(EC_HOST_EVENT_LID_CLOSED);
+#endif
}
test_mockable int lid_is_open(void)