diff options
author | Anton Staaf <robotboy@chromium.org> | 2016-02-22 10:53:33 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-02-22 23:50:52 -0800 |
commit | 0a644a91250671bb20a7815105ec532b42da19c1 (patch) | |
tree | a6871aa61a82970b8cf716c7a64c6d0f3fc73705 /board/chell | |
parent | 74615c1011382d930f3c4be72ec043ad35856b95 (diff) | |
download | chrome-ec-0a644a91250671bb20a7815105ec532b42da19c1.tar.gz |
GPIO: Move definitions of GPIO_KB_INPUT and OUTPUT
Previously these were often done in board.c files, which made it
impossible to include the gpio.inc anywhere else. As part of
refactoring the GPIO code we now need to be able to include gpio.inc
from common/gpio.c. Moving these defines into gpio.inc makes them
available wherever gpio.inc is included.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Change-Id: I28e7b5a1d40b113ae824b18f020b2d1e51e0c08a
Reviewed-on: https://chromium-review.googlesource.com/328822
Commit-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'board/chell')
-rw-r--r-- | board/chell/board.c | 4 | ||||
-rw-r--r-- | board/chell/gpio.inc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/board/chell/board.c b/board/chell/board.c index 759521eeb9..764dc393d5 100644 --- a/board/chell/board.c +++ b/board/chell/board.c @@ -41,10 +41,6 @@ #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args) #define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ## args) -#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP) -#define GPIO_KB_OUTPUT (GPIO_ODR_HIGH) -#define GPIO_KB_OUTPUT_COL2 (GPIO_OUT_LOW) - #define I2C_ADDR_BD99992 0x60 /* Exchange status with PD MCU. */ diff --git a/board/chell/gpio.inc b/board/chell/gpio.inc index 5bb25820c5..4805b20496 100644 --- a/board/chell/gpio.inc +++ b/board/chell/gpio.inc @@ -79,6 +79,10 @@ GPIO(USB1_ENABLE, PIN(36), GPIO_OUT_LOW) GPIO(USB2_OTG_ID, PIN(13), GPIO_ODR_LOW) GPIO(USB2_OTG_VBUSSENSE, PIN(140), GPIO_OUT_LOW) +#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP) +#define GPIO_KB_OUTPUT (GPIO_ODR_HIGH) +#define GPIO_KB_OUTPUT_COL2 (GPIO_OUT_LOW) + /* Board version */ GPIO(BOARD_VERSION1, PIN(10), GPIO_INPUT) GPIO(BOARD_VERSION2, PIN(7), GPIO_INPUT) |