summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/ampton/board.c8
-rw-r--r--board/ampton/board.h2
-rw-r--r--board/ampton/gpio.inc2
3 files changed, 11 insertions, 1 deletions
diff --git a/board/ampton/board.c b/board/ampton/board.c
index 9b62a8dd02..588cc72485 100644
--- a/board/ampton/board.c
+++ b/board/ampton/board.c
@@ -371,6 +371,14 @@ static int board_with_sensor_icm42607(void)
return sku_id == 57;
}
+void motion_interrupt(enum gpio_signal signal)
+{
+ if (board_with_sensor_icm42607())
+ icm42607_interrupt(signal);
+ else
+ bmi160_interrupt(signal);
+}
+
static void board_update_sensor_config_from_sku(void)
{
if (board_is_convertible()) {
diff --git a/board/ampton/board.h b/board/ampton/board.h
index f1b33b14de..059756cd41 100644
--- a/board/ampton/board.h
+++ b/board/ampton/board.h
@@ -105,6 +105,8 @@ enum battery_type {
BATTERY_TYPE_COUNT,
};
+void motion_interrupt(enum gpio_signal signal);
+
#endif /* !__ASSEMBLER__ */
#endif /* __CROS_EC_BOARD_H */
diff --git a/board/ampton/gpio.inc b/board/ampton/gpio.inc
index 8b0a433842..854a28655d 100644
--- a/board/ampton/gpio.inc
+++ b/board/ampton/gpio.inc
@@ -41,7 +41,7 @@ GPIO_INT(ESPI_RESET_L, PIN(D, 2), GPIO_INT_FALLING | GPIO_SEL_1P8V, espi_reset
GPIO_INT(TABLET_MODE_L, PIN(H, 4), GPIO_INT_BOTH, gmr_tablet_switch_isr)
GPIO_INT(EC_VOLDN_BTN_ODL, PIN(D, 6), GPIO_INT_BOTH, button_interrupt)
GPIO_INT(EC_VOLUP_BTN_ODL, PIN(D, 5), GPIO_INT_BOTH, button_interrupt)
-GPIO_INT(BASE_SIXAXIS_INT_L, PIN(J, 2), GPIO_INT_FALLING | GPIO_SEL_1P8V, bmi160_interrupt)
+GPIO_INT(BASE_SIXAXIS_INT_L, PIN(J, 2), GPIO_INT_FALLING | GPIO_SEL_1P8V, motion_interrupt)
GPIO(LID_ACCEL_INT_L, PIN(J, 3), GPIO_INPUT | GPIO_SEL_1P8V)
GPIO(PCH_PLTRST_L, PIN(E, 3), GPIO_INPUT) /* PLT_RST_L: Platform Reset from SoC */