diff options
author | Jett Rink <jettrink@chromium.org> | 2018-11-14 11:51:19 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-16 05:01:38 -0800 |
commit | 70d01fabc76b72fe0f83de4a5a3a3b6958e7a9bf (patch) | |
tree | 9ebaf30c0d4688b4e792084da5a2aedcf8f5719e | |
parent | 674d41f09e2ea1d27c98f0c63a1df83b4a419557 (diff) | |
download | chrome-ec-70d01fabc76b72fe0f83de4a5a3a3b6958e7a9bf.tar.gz |
meep: set PD on unused interrupt
If the SKU does not populate the base accel, then we should not
enable the interrupt and add a pull down to keep the line from floating.
BRANCH=none
BUG=none
TEST=verfied similar change on bobba
Change-Id: I29b4367905dadb741916bc5b9bb045bfc6b784ea
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1336289
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
-rw-r--r-- | board/meep/board.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/board/meep/board.c b/board/meep/board.c index 12c08c3452..82f5eefca9 100644 --- a/board/meep/board.c +++ b/board/meep/board.c @@ -267,9 +267,14 @@ static void board_update_sensor_config_from_sku(void) { if (board_is_convertible()) { motion_sensor_count = ARRAY_SIZE(motion_sensors); + /* Enable Base Accel interrupt */ + gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L); } else { motion_sensor_count = 0; tablet_disable_switch(); + /* Base accel is not stuffed, don't allow line to float */ + gpio_set_flags(GPIO_BASE_SIXAXIS_INT_L, + GPIO_INPUT | GPIO_PULL_DOWN); } } @@ -288,14 +293,6 @@ static void cbi_init(void) } DECLARE_HOOK(HOOK_INIT, cbi_init, HOOK_PRIO_INIT_I2C + 1); -/* Initialize board. */ -static void board_init(void) -{ - /* Enable Base Accel interrupt */ - gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L); -} -DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); - void board_hibernate_late(void) { int i; |