summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/coral/board.c1
-rw-r--r--board/eve/board.c1
-rw-r--r--board/reef/board.c1
-rw-r--r--board/reef_mchp/board.c1
-rw-r--r--common/lid_switch.c2
-rw-r--r--include/lid_switch.h5
6 files changed, 5 insertions, 6 deletions
diff --git a/board/coral/board.c b/board/coral/board.c
index d26978361a..21729489bc 100644
--- a/board/coral/board.c
+++ b/board/coral/board.c
@@ -118,7 +118,6 @@ void anx74xx_cable_det_interrupt(enum gpio_signal signal)
static void enable_input_devices(void);
DECLARE_DEFERRED(enable_input_devices);
-#define LID_DEBOUNCE_US (30 * MSEC) /* Debounce time for lid switch */
void tablet_mode_interrupt(enum gpio_signal signal)
{
hook_call_deferred(&enable_input_devices_data, LID_DEBOUNCE_US);
diff --git a/board/eve/board.c b/board/eve/board.c
index a972cb4ebc..fb0fc4b87a 100644
--- a/board/eve/board.c
+++ b/board/eve/board.c
@@ -85,7 +85,6 @@ static void tcpc_alert_event(enum gpio_signal signal)
static void enable_input_devices(void);
DECLARE_DEFERRED(enable_input_devices);
-#define LID_DEBOUNCE_US (30 * MSEC)
void tablet_mode_interrupt(enum gpio_signal signal)
{
hook_call_deferred(&enable_input_devices_data, LID_DEBOUNCE_US);
diff --git a/board/reef/board.c b/board/reef/board.c
index 3dc5948fe3..e224169f3b 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -116,7 +116,6 @@ void anx74xx_cable_det_interrupt(enum gpio_signal signal)
static void enable_input_devices(void);
DECLARE_DEFERRED(enable_input_devices);
-#define LID_DEBOUNCE_US (30 * MSEC) /* Debounce time for lid switch */
void tablet_mode_interrupt(enum gpio_signal signal)
{
hook_call_deferred(&enable_input_devices_data, LID_DEBOUNCE_US);
diff --git a/board/reef_mchp/board.c b/board/reef_mchp/board.c
index be24f34aa8..c9293ad080 100644
--- a/board/reef_mchp/board.c
+++ b/board/reef_mchp/board.c
@@ -152,7 +152,6 @@ void anx74xx_cable_det_interrupt(enum gpio_signal signal)
static void enable_input_devices(void);
DECLARE_DEFERRED(enable_input_devices);
-#define LID_DEBOUNCE_US (30 * MSEC) /* Debounce time for lid switch */
void tablet_mode_interrupt(enum gpio_signal signal)
{
hook_call_deferred(&enable_input_devices_data, LID_DEBOUNCE_US);
diff --git a/common/lid_switch.c b/common/lid_switch.c
index f8e1708f94..050bbd9512 100644
--- a/common/lid_switch.c
+++ b/common/lid_switch.c
@@ -18,8 +18,6 @@
#define CPUTS(outstr) cputs(CC_SWITCH, outstr)
#define CPRINTS(format, args...) cprints(CC_SWITCH, format, ## args)
-#define LID_DEBOUNCE_US (30 * MSEC) /* Debounce time for lid switch */
-
/* if no X-macro is defined for LID switch GPIO, use GPIO_LID_OPEN as default */
#ifndef CONFIG_LID_SWITCH_GPIO_LIST
#define CONFIG_LID_SWITCH_GPIO_LIST LID_GPIO(GPIO_LID_OPEN)
diff --git a/include/lid_switch.h b/include/lid_switch.h
index 627a41d62c..93d093a21f 100644
--- a/include/lid_switch.h
+++ b/include/lid_switch.h
@@ -12,6 +12,11 @@
#include "stdbool.h"
/**
+ * Debounce time for lid switch
+ */
+#define LID_DEBOUNCE_US (30 * MSEC)
+
+/**
* Return non-zero if lid is open.
*
* Uses the debounced lid state, not the raw signal from the GPIO.