summaryrefslogtreecommitdiff
path: root/board/bds/board.c
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2014-06-24 07:52:49 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-26 02:43:01 +0000
commit9ccfd4553e708a5df4be3aa18b97c75da3f6c1b9 (patch)
treebd10678c7ee25901de97260967b8bee4a849baa5 /board/bds/board.c
parent88c0ffd692b4e6d5fadc75bb15255e0684d6a1c9 (diff)
downloadchrome-ec-9ccfd4553e708a5df4be3aa18b97c75da3f6c1b9.tar.gz
gpio: Replace duplication in gpio declarations with X-macro file
Previously each board.h and board.c contained an enum and an array for gpio definitons that had to be manually kept in sync, with no compiler assistance other than that their lengths matched. This change adds a single gpio.inc file that declares all gpio's that a board uses and is used as an X-macro include file to generate both the gpio_signal enum and the gpio_list array. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=none TEST=make buildall -j Change-Id: If9c9feca968619a59ff9f20701359bcb9374e4da Reviewed-on: https://chromium-review.googlesource.com/205354 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'board/bds/board.c')
-rw-r--r--board/bds/board.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/board/bds/board.c b/board/bds/board.c
index 7dc4985f9a..8f2142df09 100644
--- a/board/bds/board.c
+++ b/board/bds/board.c
@@ -38,16 +38,7 @@ const struct i2c_port_t i2c_ports[] = {
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
-
-/* GPIO signal list. Must match order from enum gpio_signal. */
-const struct gpio_info gpio_list[] = {
- {"RECOVERY_L", GPIO_D, (1<<1), GPIO_PULL_UP, NULL},
- {"DEBUG_LED", GPIO_A, (1<<7), GPIO_OUT_LOW, NULL},
- /* Unimplemented signals which we need to emulate for now */
- GPIO_SIGNAL_NOT_IMPLEMENTED("WP"),
- GPIO_SIGNAL_NOT_IMPLEMENTED("ENTERING_RW"),
-};
-BUILD_ASSERT(ARRAY_SIZE(gpio_list) == GPIO_COUNT);
+#include "gpio_list.h"
/* Pins with alternate functions */
const struct gpio_alt_func gpio_alt_funcs[] = {