diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-04-01 10:56:33 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-02 14:12:57 -0700 |
commit | bdd16f82069f9e07e9a9e3008c318d9581ce0664 (patch) | |
tree | 16287a843f975c9505636dcc13fbaef50cb08f9a /include/switch.h | |
parent | 50c53c0d542d6fc3184db09a35196b4c702536c5 (diff) | |
download | chrome-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 'include/switch.h')
-rw-r--r-- | include/switch.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/include/switch.h b/include/switch.h index ffb8eaee7b..e86711ca49 100644 --- a/include/switch.h +++ b/include/switch.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -11,24 +11,16 @@ #include "common.h" #include "gpio.h" +#ifdef CONFIG_TASK_SWITCH /** * Interrupt handler for switch inputs. * * @param signal Signal which triggered the interrupt. */ void switch_interrupt(enum gpio_signal signal); - -/** - * Switch task. - */ -void switch_task(void); - -/** - * Return non-zero if lid is open. - * - * Uses the debounced lid state, not the raw signal from the GPIO. - */ -int switch_get_lid_open(void); +#else +#define switch_interrupt NULL +#endif /* CONFIG_TASK_SWITCH */ /** * Return non-zero if write protect signal is asserted. |