diff options
Diffstat (limited to 'board/pazquel/board.c')
-rw-r--r-- | board/pazquel/board.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/board/pazquel/board.c b/board/pazquel/board.c index 8415e59f36..190432bdfd 100644 --- a/board/pazquel/board.c +++ b/board/pazquel/board.c @@ -270,6 +270,18 @@ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = { }, }; +static void board_update_sensor_config_clamshell(void) +{ + motion_sensor_count = 0; + gmr_tablet_switch_disable(); + /* The sensors are not stuffed; don't allow lines to float */ + gpio_set_flags(GPIO_ACCEL_GYRO_INT_L, + GPIO_INPUT | GPIO_PULL_DOWN); + gpio_set_flags(GPIO_LID_ACCEL_INT_L, + GPIO_INPUT | GPIO_PULL_DOWN); +} +DECLARE_HOOK(HOOK_INIT, board_update_sensor_config_clamshell, + HOOK_PRIO_INIT_I2C + 2); /* Initialize board. */ static void board_init(void) { @@ -600,4 +612,4 @@ struct motion_sensor_t motion_sensors[] = { .max_frequency = BMI_GYRO_MAX_FREQ, }, }; -const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); +unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); |