summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerrit <chrome-bot@google.com>2012-05-08 14:39:37 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2012-05-08 14:39:37 -0700
commit87b427829993e7c5b2fb66fc1e134ace43d28cf9 (patch)
treea3be08fc8c33a5325d06b640753f57e7acfafe43
parent468bc6171c6c7b2b60d6b41ce443e3a6f0013161 (diff)
parent42842e437848a29cff276715aaef6ee2ebc75584 (diff)
downloadchrome-ec-87b427829993e7c5b2fb66fc1e134ace43d28cf9.tar.gz
Merge "Move gpio list into gpio.h header file"
-rw-r--r--chip/lm4/gpio.c4
-rw-r--r--chip/stm32/gpio-stm32f100.c3
-rw-r--r--chip/stm32/gpio-stm32l15x.c3
-rw-r--r--chip/stm32/keyboard_scan.c2
-rw-r--r--common/gpio_commands.c4
-rw-r--r--include/gpio.h3
6 files changed, 3 insertions, 16 deletions
diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c
index fedfedc6e8..52eb28775a 100644
--- a/chip/lm4/gpio.c
+++ b/chip/lm4/gpio.c
@@ -24,10 +24,6 @@ static const uint32_t gpio_bases[] = {
};
-/* Signal information from board.c. Must match order from enum gpio_signal. */
-extern const struct gpio_info gpio_list[GPIO_COUNT];
-
-
/* Find the index of a GPIO port base address (LM4_GPIO_[A-Q]); this is used by
* the clock gating registers. Returns the index, or -1 if no match. */
static int find_gpio_port_index(uint32_t port_base)
diff --git a/chip/stm32/gpio-stm32f100.c b/chip/stm32/gpio-stm32f100.c
index db4c918ae2..2dad777f80 100644
--- a/chip/stm32/gpio-stm32f100.c
+++ b/chip/stm32/gpio-stm32f100.c
@@ -17,9 +17,6 @@
#define CPUTS(outstr) cputs(CC_GPIO, outstr)
#define CPRINTF(format, args...) cprintf(CC_GPIO, format, ## args)
-/* Signal information from board.c. Must match order from enum gpio_signal. */
-extern const struct gpio_info gpio_list[GPIO_COUNT];
-
/* For each EXTI bit, record which GPIO entry is using it */
static const struct gpio_info *exti_events[16];
diff --git a/chip/stm32/gpio-stm32l15x.c b/chip/stm32/gpio-stm32l15x.c
index cd07e61361..3b04e69438 100644
--- a/chip/stm32/gpio-stm32l15x.c
+++ b/chip/stm32/gpio-stm32l15x.c
@@ -17,9 +17,6 @@
#define CPUTS(outstr) cputs(CC_GPIO, outstr)
#define CPRINTF(format, args...) cprintf(CC_GPIO, format, ## args)
-/* Signal information from board.c. Must match order from enum gpio_signal. */
-extern const struct gpio_info gpio_list[GPIO_COUNT];
-
/* For each EXTI bit, record which GPIO entry is using it */
static const struct gpio_info *exti_events[16];
diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c
index 5dd6a9b436..b3d340172e 100644
--- a/chip/stm32/keyboard_scan.c
+++ b/chip/stm32/keyboard_scan.c
@@ -23,8 +23,6 @@
#define CPUTS(outstr) cputs(CC_KEYSCAN, outstr)
#define CPRINTF(format, args...) cprintf(CC_KEYSCAN, format, ## args)
-extern const struct gpio_info gpio_list[];
-
/* used for select_column() */
enum COL_INDEX {
COL_ASSERT_ALL = -2,
diff --git a/common/gpio_commands.c b/common/gpio_commands.c
index c1f444a0c7..1f32cc2e5e 100644
--- a/common/gpio_commands.c
+++ b/common/gpio_commands.c
@@ -11,10 +11,6 @@
#include "util.h"
-/* Signal information from board.c. Must match order from enum gpio_signal. */
-extern const struct gpio_info gpio_list[GPIO_COUNT];
-
-
/* Find a GPIO signal by name. Returns the signal index, or GPIO_COUNT if
* no match. */
static enum gpio_signal find_signal_by_name(const char *name)
diff --git a/include/gpio.h b/include/gpio.h
index b3bd4258f4..bb19c91a6f 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -51,6 +51,9 @@ struct gpio_info {
void (*irq_handler)(enum gpio_signal signal);
};
+/* Signal information from board.c. Must match order from enum gpio_signal. */
+extern const struct gpio_info gpio_list[GPIO_COUNT];
+
/* Macro for signals which don't exist */
#define GPIO_SIGNAL_NOT_IMPLEMENTED(name) {name, LM4_GPIO_A, 0, 0, NULL}