summaryrefslogtreecommitdiff
path: root/board/hadoken
diff options
context:
space:
mode:
authorSteven Jian <steven.jian@intel.com>2015-04-01 01:25:42 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-27 03:58:16 +0000
commit937cc8a64e5971def21303e7a19a4ad9553e0ace (patch)
tree321543152e0c4d61e686ca7b92edd0d027bb168b /board/hadoken
parente216906c9327655d71b8758b7f11c2f744e55018 (diff)
downloadchrome-ec-937cc8a64e5971def21303e7a19a4ad9553e0ace.tar.gz
mec1322: Simplify GPIO lists
Our existing GPIO macros use port# / gpio#, but the concept of different GPIO ports does not exist on the mec1322. Therefore, add new GPIO macros for chips which do not have distinct GPIO ports. BUG=None BRANCH=None TEST=make buildall -j Change-Id: Ibda97c6563ad447d16dab39ecadab43ccb25174b Signed-off-by: Steven Jian <steven.jian@intel.com> Reviewed-on: https://chromium-review.googlesource.com/262841 Reviewed-by: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'board/hadoken')
-rw-r--r--board/hadoken/gpio.inc64
1 files changed, 32 insertions, 32 deletions
diff --git a/board/hadoken/gpio.inc b/board/hadoken/gpio.inc
index 26e8a0fd76..eb8be3d3f4 100644
--- a/board/hadoken/gpio.inc
+++ b/board/hadoken/gpio.inc
@@ -14,48 +14,48 @@
/*
* TODO(yjlou): call keyboard_raw_gpio_interrupt() in chip/nrf51/keyboard_raw.c
*/
-GPIO(KB_IN00, 0, 6, GPIO_KB_INPUT)
-GPIO(KB_IN01, 0, 24, GPIO_KB_INPUT)
-GPIO(KB_IN02, 0, 1, GPIO_KB_INPUT)
-GPIO(KB_IN03, 0, 4, GPIO_KB_INPUT)
-GPIO(KB_IN04, 0, 0, GPIO_KB_INPUT)
-GPIO(KB_IN05, 0, 30, GPIO_KB_INPUT)
-GPIO(KB_IN06, 0, 27, GPIO_KB_INPUT)
-GPIO(KB_IN07, 0, 26, GPIO_KB_INPUT)
+GPIO(KB_IN00, PIN(0, 6), GPIO_KB_INPUT)
+GPIO(KB_IN01, PIN(0, 24), GPIO_KB_INPUT)
+GPIO(KB_IN02, PIN(0, 1), GPIO_KB_INPUT)
+GPIO(KB_IN03, PIN(0, 4), GPIO_KB_INPUT)
+GPIO(KB_IN04, PIN(0, 0), GPIO_KB_INPUT)
+GPIO(KB_IN05, PIN(0, 30), GPIO_KB_INPUT)
+GPIO(KB_IN06, PIN(0, 27), GPIO_KB_INPUT)
+GPIO(KB_IN07, PIN(0, 26), GPIO_KB_INPUT)
/* Other inputs */
-GPIO(MCU_GPIO_13, 0, 13, GPIO_INPUT) /* PAIR on the debug board */
-GPIO(MCU_GPIO_14, 0, 14, GPIO_INPUT) /* TP 4 */
-GPIO(MCU_GPIO_17, 0, 17, GPIO_INPUT) /* TP 5 */
-GPIO(MCU_GPIO_19, 0, 19, GPIO_INPUT) /* TP 6 */
-GPIO(BQ27621_GPOUT, 0, 20, GPIO_INPUT) /* Fuel Gauge */
-GPIO(LID_PRESENT_L, 0, 31, GPIO_INPUT) /* Hall sensor */
+GPIO(MCU_GPIO_13, PIN(0, 13), GPIO_INPUT) /* PAIR on the debug board */
+GPIO(MCU_GPIO_14, PIN(0, 14), GPIO_INPUT) /* TP 4 */
+GPIO(MCU_GPIO_17, PIN(0, 17), GPIO_INPUT) /* TP 5 */
+GPIO(MCU_GPIO_19, PIN(0, 19), GPIO_INPUT) /* TP 6 */
+GPIO(BQ27621_GPOUT, PIN(0, 20), GPIO_INPUT) /* Fuel Gauge */
+GPIO(LID_PRESENT_L, PIN(0, 31), GPIO_INPUT) /* Hall sensor */
/* Will be an output at some point */
-GPIO(IND_CHRG_DISABLE, 0, 21, GPIO_INPUT) /* Control for charging */
+GPIO(IND_CHRG_DISABLE, PIN(0, 21), GPIO_INPUT) /* Control for charging */
/* Outputs */
-GPIO(KB_OUT00, 0, 2, GPIO_KB_OUTPUT)
-GPIO(KB_OUT01, 0, 10, GPIO_KB_OUTPUT)
-GPIO(KB_OUT02, 0, 7, GPIO_KB_OUTPUT)
-GPIO(KB_OUT03, 0, 5, GPIO_KB_OUTPUT)
-GPIO(KB_OUT04, 0, 3, GPIO_KB_OUTPUT)
-GPIO(KB_OUT05, 0, 9, GPIO_KB_OUTPUT)
-GPIO(KB_OUT06, 0, 8, GPIO_KB_OUTPUT)
-GPIO(KB_OUT07, 0, 28, GPIO_KB_OUTPUT)
-GPIO(KB_OUT08, 0, 18, GPIO_KB_OUTPUT)
-GPIO(KB_OUT09, 0, 16, GPIO_KB_OUTPUT)
-GPIO(KB_OUT10, 0, 12, GPIO_KB_OUTPUT)
-GPIO(KB_OUT11, 0, 15, GPIO_KB_OUTPUT)
-GPIO(KB_OUT12, 0, 11, GPIO_KB_OUTPUT)
+GPIO(KB_OUT00, PIN(0, 2), GPIO_KB_OUTPUT)
+GPIO(KB_OUT01, PIN(0, 10), GPIO_KB_OUTPUT)
+GPIO(KB_OUT02, PIN(0, 7), GPIO_KB_OUTPUT)
+GPIO(KB_OUT03, PIN(0, 5), GPIO_KB_OUTPUT)
+GPIO(KB_OUT04, PIN(0, 3), GPIO_KB_OUTPUT)
+GPIO(KB_OUT05, PIN(0, 9), GPIO_KB_OUTPUT)
+GPIO(KB_OUT06, PIN(0, 8), GPIO_KB_OUTPUT)
+GPIO(KB_OUT07, PIN(0, 28), GPIO_KB_OUTPUT)
+GPIO(KB_OUT08, PIN(0, 18), GPIO_KB_OUTPUT)
+GPIO(KB_OUT09, PIN(0, 16), GPIO_KB_OUTPUT)
+GPIO(KB_OUT10, PIN(0, 12), GPIO_KB_OUTPUT)
+GPIO(KB_OUT11, PIN(0, 15), GPIO_KB_OUTPUT)
+GPIO(KB_OUT12, PIN(0, 11), GPIO_KB_OUTPUT)
/* Configure the TWI (I2C) interface in the init function. */
-GPIO(MCU_SCL, 0, 23, GPIO_INPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
-GPIO(MCU_SDA, 0, 22, GPIO_INPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
+GPIO(MCU_SCL, PIN(0, 23), GPIO_INPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
+GPIO(MCU_SDA, PIN(0, 22), GPIO_INPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
/* Use port 0 for I2C (TWI0), Pins 22 & 23 */
-ALTERNATE(0, 0x800000, NRF51_TWI0_ALT_FUNC_SCL, MODULE_I2C, GPIO_INPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
-ALTERNATE(0, 0x400000, NRF51_TWI0_ALT_FUNC_SDA, MODULE_I2C, GPIO_INPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
+ALTERNATE(PIN_MASK(0, 0x800000), NRF51_TWI0_ALT_FUNC_SCL, MODULE_I2C, GPIO_INPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
+ALTERNATE(PIN_MASK(0, 0x400000), NRF51_TWI0_ALT_FUNC_SDA, MODULE_I2C, GPIO_INPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
/* Unimplemented */
UNIMPLEMENTED(ENTERING_RW)