summaryrefslogtreecommitdiff
path: root/board/hammer/gpio.inc
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2019-08-12 08:52:37 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-12 05:39:14 +0000
commite4440d52945fef7e5f3c98911f50363e65fc488e (patch)
tree73cffd4360d9bdccd72cee70770f29075301cd1f /board/hammer/gpio.inc
parentfb0eb4d1b932ba469f7385e42cf43f5a11f09c85 (diff)
downloadchrome-ec-e4440d52945fef7e5f3c98911f50363e65fc488e.tar.gz
hammer: Refactor config options to support more variants
board.h is already quite difficult to read, and will become worse as we add more and more derivatives, let's refactor most of the variations into variants.h. BRANCH=none BUG=b:138968914 TEST=make buildall -j, see that there is no size change before and after the change. Change-Id: Ideb381d8d04c65c3e76eb3ab9353e1ce5cdee954 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1746352 Reviewed-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'board/hammer/gpio.inc')
-rw-r--r--board/hammer/gpio.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/board/hammer/gpio.inc b/board/hammer/gpio.inc
index 34c0838612..806cb19f7f 100644
--- a/board/hammer/gpio.inc
+++ b/board/hammer/gpio.inc
@@ -10,9 +10,9 @@
#ifdef SECTION_IS_RW
GPIO_INT(TOUCHPAD_INT, PIN(B, 8), GPIO_INT_FALLING, touchpad_interrupt)
-#ifdef BOARD_WHISKERS
+#ifdef CONFIG_HALL_SENSOR
GPIO_INT(TABLET_MODE_L, PIN(B, 11), GPIO_PULL_UP | GPIO_INT_BOTH, hall_sensor_isr)
-#endif /* BOARD_WHISKERS */
+#endif /* CONFIG_HALL_SENSOR */
#endif /* SECTION_IS_RW */
/* Keyboard inputs */
@@ -57,7 +57,7 @@ GPIO(KB_OUT12, PIN(C, 13), GPIO_KB_OUTPUT)
GPIO(MASTER_I2C_SCL, PIN(B, 6), GPIO_INPUT)
GPIO(MASTER_I2C_SDA, PIN(B, 7), GPIO_INPUT)
/* TODO(crosbug.com/p/59083): Disable trackpad when appropriate */
-#ifdef BOARD_WHISKERS
+#ifdef HAS_EN_PP3300_TP_ACTIVE_HIGH
GPIO(EN_PP3300_TP, PIN(A, 14), GPIO_OUT_HIGH)
#else
GPIO(EN_PP3300_TP_ODL, PIN(A, 14), GPIO_OUT_LOW)
@@ -93,7 +93,7 @@ ALTERNATE(PIN_MASK(A, 0x0004), 1, MODULE_USART, GPIO_ODR_HIGH) /* USART2: PA2 -
ALTERNATE(PIN_MASK(B, 0x0c00), 1, MODULE_I2C, 0) /* I2C CHARGER: PB10/11 GPIO_ODR_HIGH */
#endif
-#ifdef BOARD_WHISKERS
+#ifdef HAS_SPI_TOUCHPAD
ALTERNATE(PIN_MASK(B, 0x0038), 0, MODULE_SPI_MASTER, 0) /* SPI MASTER:PB3/4/5 */
#endif