summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorChromeOS Developer <rspangler@chromium.org>2013-03-15 14:55:53 -0700
committerChromeBot <chrome-bot@google.com>2013-03-19 10:31:12 -0700
commit6c285c09941dfb1924b037476e823ecff20c897d (patch)
tree02fa6d9f4a20f380ed6bc99e6994d6ab2c65c2ca /board
parentc196c66432ea9d74a84602f4a49c4fd43de1ddd5 (diff)
downloadchrome-ec-6c285c09941dfb1924b037476e823ecff20c897d.tar.gz
Move external power detect for link to its own file
Now that it doesn't need to leverage SWITCH_TASK to send the AC_CHANGE notification, pure GPIO-based external power detection can move from switch.c to its own file. BUG=chrome-os-partner:18256 BRANCH=none TEST=add AC power, UI shows charging indicator; remove AC, indicator goes away Change-Id: Id495f34185b7d971c241ac6d0a8311a6bf544507 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/45789
Diffstat (limited to 'board')
-rw-r--r--board/link/board.c5
-rw-r--r--board/link/board.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/board/link/board.c b/board/link/board.c
index bb72fdccc1..fd3c573d26 100644
--- a/board/link/board.c
+++ b/board/link/board.c
@@ -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.
*/
@@ -6,6 +6,7 @@
#include "adc.h"
#include "common.h"
+#include "extpower.h"
#include "gpio.h"
#include "i2c.h"
#include "lm4_adc.h"
@@ -31,7 +32,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
/* Other inputs */
{"THERMAL_DATA_READYn", LM4_GPIO_B, (1<<4), 0, NULL},
{"AC_PRESENT", LM4_GPIO_H, (1<<3), GPIO_INT_BOTH,
- switch_interrupt},
+ extpower_interrupt},
{"BOARD_VERSION1", LM4_GPIO_H, (1<<6), 0, NULL},
{"BOARD_VERSION2", LM4_GPIO_L, (1<<6), 0, NULL},
{"BOARD_VERSION3", LM4_GPIO_L, (1<<7), 0, NULL},
diff --git a/board/link/board.h b/board/link/board.h
index d02715abad..cc7463c961 100644
--- a/board/link/board.h
+++ b/board/link/board.h
@@ -18,6 +18,7 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_BQ24725
#define CONFIG_CONSOLE_CMDHELP
+#define CONFIG_EXTPOWER_GPIO
#define CONFIG_LPC
#define CONFIG_ONEWIRE
#define CONFIG_ONEWIRE_LED