summaryrefslogtreecommitdiff
path: root/board/daisy/board.c
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-06-20 23:50:35 +0000
committerGerrit <chrome-bot@google.com>2012-06-22 11:34:17 -0700
commitb84ef3b1f2e8f266435030654976b409889a0344 (patch)
tree07e0618b3d617c86d0012493052fd5fffd87c9bd /board/daisy/board.c
parent232363bac25dc6af5d2ff580fded6baff9546398 (diff)
downloadchrome-ec-b84ef3b1f2e8f266435030654976b409889a0344.tar.gz
stm32: drive the keyboard power LED
Put the power LED in the right state (off, on, breathing) depending on the AP state (off, running, suspending). The power LED is connected to GPIO B3. The AP suspend detection is done through GPIO A7. (so we no longer configure it as SPI alternate function) Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:10647 TEST=on Lucas DVT, boot/stop the board and see the LED on and off. Change-Id: I42121aacab35e9da7a751dc9f56bcc5af7850783 Reviewed-on: https://gerrit.chromium.org/gerrit/25880 Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/daisy/board.c')
-rw-r--r--board/daisy/board.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/daisy/board.c b/board/daisy/board.c
index fa15b04ebe..8f20fdb18f 100644
--- a/board/daisy/board.c
+++ b/board/daisy/board.c
@@ -33,8 +33,10 @@
/* GPIO interrupt handlers prototypes */
#ifndef CONFIG_TASK_GAIAPOWER
#define gaia_power_event NULL
+#define gaia_suspend_event NULL
#else
void gaia_power_event(enum gpio_signal signal);
+void gaia_suspend_event(enum gpio_signal signal);
#endif
#ifndef CONFIG_TASK_KEYSCAN
#define matrix_interrupt NULL
@@ -48,6 +50,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
{"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},
+ {"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},
{"KB_IN02", GPIO_C, (1<<10), GPIO_KB_INPUT, matrix_interrupt},
@@ -66,6 +69,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
{"PMIC_PWRON_L", GPIO_A, (1<<12), GPIO_OUT_HIGH, NULL},
{"ENTERING_RW", GPIO_H, (1<<0), GPIO_OUT_LOW, NULL},
{"CHARGER_EN", GPIO_B, (1<<2), GPIO_OUT_LOW, NULL},
+ {"POWER_LED_L", GPIO_B, (1<<3), GPIO_OUT_HIGH, NULL},
{"EC_INT", GPIO_B, (1<<9), GPIO_HI_Z, NULL},
{"CODEC_INT", GPIO_H, (1<<1), GPIO_HI_Z, NULL},
{"KB_OUT00", GPIO_B, (1<<0), GPIO_KB_OUTPUT, NULL},