summaryrefslogtreecommitdiff
path: root/board/fleex
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-11-14 11:51:19 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-11-16 05:01:38 -0800
commit674d41f09e2ea1d27c98f0c63a1df83b4a419557 (patch)
treecca0ce7e9f80fd1453e0cd43a84ce6e31c5b21b7 /board/fleex
parentd488147537b0758b7fe1c2c5c1043aed664dec7e (diff)
downloadchrome-ec-674d41f09e2ea1d27c98f0c63a1df83b4a419557.tar.gz
fleex: 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: I85fdfc001bcafdf4d56a2459837c2f4f4f0b64fa Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1336288 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Diffstat (limited to 'board/fleex')
-rw-r--r--board/fleex/board.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/board/fleex/board.c b/board/fleex/board.c
index 9497d97b78..e1d05853a0 100644
--- a/board/fleex/board.c
+++ b/board/fleex/board.c
@@ -219,9 +219,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);
}
}
@@ -237,14 +242,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);
-
#ifndef TEST_BUILD
/* This callback disables keyboard when convertibles are fully open */
void lid_angle_peripheral_enable(int enable)