summaryrefslogtreecommitdiff
path: root/board/phaser
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
commitd488147537b0758b7fe1c2c5c1043aed664dec7e (patch)
tree2777c98cc26d39d3f1d4193023aec69de455718a /board/phaser
parentb2b656ab9773d93eab24cef58a32469c0fe2e589 (diff)
downloadchrome-ec-d488147537b0758b7fe1c2c5c1043aed664dec7e.tar.gz
phaser: 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: Ifd3ef029a18484a4c227db6fcc4312ea3a8603db Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1336287 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Diffstat (limited to 'board/phaser')
-rw-r--r--board/phaser/board.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/board/phaser/board.c b/board/phaser/board.c
index 384e61ef3b..ccfd92086e 100644
--- a/board/phaser/board.c
+++ b/board/phaser/board.c
@@ -221,9 +221,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);
}
}
@@ -239,14 +244,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)