summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2012-07-02 20:39:30 -0700
committerGerrit <chrome-bot@google.com>2012-07-07 19:59:12 -0700
commit114b7c844eee61e985d8279bdb8caf656d9a714b (patch)
tree3f61fade2d538fcdc154bb89373370598de41827
parentdef3a85e9e4c2843774db13a166a300e50a78315 (diff)
downloadchrome-ec-114b7c844eee61e985d8279bdb8caf656d9a714b.tar.gz
snow/daisy: enable lid open
This enables lid open on Snow (and presumably Daisy). For now we only care about interrupting on lid open (rising edge of LID_OPEN) to turn on the AP. BUG=chrome-os-partner:9708 TEST=Tested on Snow Signed-off-by: David Hendricks <dhedndrix@chromium.org> Change-Id: I8f6cb4dd9d3ebc0380c8a5e7a3f2ce967e3eff48 Reviewed-on: https://gerrit.chromium.org/gerrit/26648 Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: David Hendricks <dhendrix@chromium.org> Commit-Ready: David Hendricks <dhendrix@chromium.org>
-rw-r--r--board/daisy/board.c4
-rw-r--r--board/snow/board.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/board/daisy/board.c b/board/daisy/board.c
index 82a1440665..266932d7b3 100644
--- a/board/daisy/board.c
+++ b/board/daisy/board.c
@@ -34,9 +34,11 @@
#ifndef CONFIG_TASK_GAIAPOWER
#define gaia_power_event NULL
#define gaia_suspend_event NULL
+#define gaia_lid_event NULL
#else
void gaia_power_event(enum gpio_signal signal);
void gaia_suspend_event(enum gpio_signal signal);
+void gaia_lid_event(enum gpio_signal signal);
#endif
#ifndef CONFIG_TASK_KEYSCAN
#define matrix_interrupt NULL
@@ -49,7 +51,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
{"PP1800_LDO2", GPIO_A, (1<<1), GPIO_INT_BOTH, gaia_power_event},
{"XPSHOLD", GPIO_A, (1<<3), GPIO_INT_RISING, gaia_power_event},
{"CHARGER_INT", GPIO_C, (1<<4), GPIO_INT_RISING, NULL},
- {"LID_OPEN", GPIO_C, (1<<13), GPIO_INT_BOTH, NULL},
+ {"LID_OPEN", GPIO_C, (1<<13), GPIO_INT_RISING, gaia_lid_event},
{"SUSPEND_L", GPIO_A, (1<<7), GPIO_INT_BOTH, gaia_suspend_event},
{"KB_IN00", GPIO_C, (1<<8), GPIO_KB_INPUT, matrix_interrupt},
{"KB_IN01", GPIO_C, (1<<9), GPIO_KB_INPUT, matrix_interrupt},
diff --git a/board/snow/board.c b/board/snow/board.c
index 10bb68f247..fcaeb77d1b 100644
--- a/board/snow/board.c
+++ b/board/snow/board.c
@@ -24,9 +24,11 @@
#ifndef CONFIG_TASK_GAIAPOWER
#define gaia_power_event NULL
#define gaia_suspend_event NULL
+#define gaia_lid_event NULL
#else
void gaia_power_event(enum gpio_signal signal);
void gaia_suspend_event(enum gpio_signal signal);
+void gaia_lid_event(enum gpio_signal signal);
#endif
#ifndef CONFIG_TASK_KEYSCAN
#define matrix_interrupt NULL
@@ -39,7 +41,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
{"PP1800_LDO2", GPIO_A, (1<<1), GPIO_INT_BOTH, gaia_power_event},
{"XPSHOLD", GPIO_A, (1<<3), GPIO_INT_RISING, gaia_power_event},
{"CHARGER_INT", GPIO_C, (1<<4), GPIO_INT_RISING, NULL},
- {"LID_OPEN", GPIO_C, (1<<13), GPIO_INT_BOTH, NULL},
+ {"LID_OPEN", GPIO_C, (1<<13), GPIO_INT_RISING, gaia_lid_event},
{"SUSPEND_L", GPIO_A, (1<<7), GPIO_INT_BOTH, gaia_suspend_event},
{"KB_IN00", GPIO_C, (1<<8), GPIO_KB_INPUT, matrix_interrupt},
{"KB_IN01", GPIO_C, (1<<9), GPIO_KB_INPUT, matrix_interrupt},