diff options
author | Anton Staaf <robotboy@chromium.org> | 2014-06-24 07:52:49 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-26 02:43:01 +0000 |
commit | 9ccfd4553e708a5df4be3aa18b97c75da3f6c1b9 (patch) | |
tree | bd10678c7ee25901de97260967b8bee4a849baa5 /board/mccroskey/board.h | |
parent | 88c0ffd692b4e6d5fadc75bb15255e0684d6a1c9 (diff) | |
download | chrome-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/mccroskey/board.h')
-rw-r--r-- | board/mccroskey/board.h | 60 |
1 files changed, 1 insertions, 59 deletions
diff --git a/board/mccroskey/board.h b/board/mccroskey/board.h index 7d4eefba2a..f99f50d7ce 100644 --- a/board/mccroskey/board.h +++ b/board/mccroskey/board.h @@ -45,65 +45,7 @@ #define TIM_CLOCK_LSB 4 #define TIM_WATCHDOG 1 -/* GPIO signal list */ -enum gpio_signal { - GPIO_KB_IN00, - GPIO_KB_IN01, - GPIO_KB_IN02, - GPIO_KB_IN03, - GPIO_KB_IN04, - GPIO_KB_IN05, - GPIO_KB_IN06, - GPIO_KB_IN07, - GPIO_KBD_PWR_BUTTON, - GPIO_OMZO_RDY_L, - GPIO_OZMO_RST_L, - GPIO_VBUS_UP_DET, - GPIO_OZMO_REQ_L, - GPIO_CHARGE_ZERO, - GPIO_CHARGE_SHUNT, - GPIO_PMIC_INT_L, - GPIO_I2C1_SCL, - GPIO_I2C1_SDA, - GPIO_KB_OUT00, - GPIO_KB_OUT01, - GPIO_KB_OUT02, - GPIO_KB_OUT03, - GPIO_KB_OUT04, - GPIO_KB_OUT05, - GPIO_KB_OUT06, - GPIO_KB_OUT07, - GPIO_KB_OUT08, - GPIO_KB_OUT09, - GPIO_KB_OUT10, - GPIO_KB_OUT11, - GPIO_KB_OUT12, - GPIO_USB_VBUS_CTRL, - GPIO_HUB_RESET, - GPIO_WP_L, - - /* - * TODO(crosbug.com/p/23494): This will be an alternate function GPIO, - * so remove it from here. - */ - GPIO_BL_PWM, - - /* Unimplemented GPIOs */ - GPIO_EC_INT, - GPIO_ENTERING_RW, - -#if 0 - GPIO_STM_USBDM, - GPIO_STM_USBDP, - GPIO_JTMS_SWDIO, - GPIO_JTCK_SWCLK, - GPIO_JTDI, - GPIO_JTDO, - GPIO_JNTRST, - GPIO_OSC32_OUT, -#endif - GPIO_COUNT -}; +#include "gpio_signal.h" #endif /* !__ASSEMBLER__ */ |