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}