summaryrefslogtreecommitdiff
path: root/common/keyboard_scan.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-04-01 10:56:33 -0700
committerChromeBot <chrome-bot@google.com>2013-04-02 14:12:57 -0700
commitbdd16f82069f9e07e9a9e3008c318d9581ce0664 (patch)
tree16287a843f975c9505636dcc13fbaef50cb08f9a /common/keyboard_scan.c
parent50c53c0d542d6fc3184db09a35196b4c702536c5 (diff)
downloadchrome-ec-bdd16f82069f9e07e9a9e3008c318d9581ce0664.tar.gz
Split lid switch code out of switch.c to its own file
This will allow ARM code to use the same lid switch code (in a subsequent CL). BUG=chrome-os-partner:18343 BRANCH=none TEST=open lid; system boots. close lid; system suspends. open lid; resumes. Change-Id: I83536a3ad24c4446dccf8a6b6e296756659070a8 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47043 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/keyboard_scan.c')
-rw-r--r--common/keyboard_scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index 7f17d8c237..2e28a1b809 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -13,6 +13,7 @@
#include "keyboard_protocol.h"
#include "keyboard_raw.h"
#include "keyboard_scan.h"
+#include "lid_switch.h"
#include "switch.h"
#include "system.h"
#include "task.h"
@@ -79,10 +80,9 @@ static int enable_scanning = 1; /* Must init to 1 for scanning at boot */
static int is_scanning_enabled(void)
{
-#ifdef BOARD_link
- /* TODO: should apply to ARM too, but need standard lid API */
+#ifdef CONFIG_LID_SWITCH
/* Scanning is never enabled when lid is closed */
- if (!switch_get_lid_open())
+ if (!lid_is_open())
return 0;
#endif