summaryrefslogtreecommitdiff
path: root/board/nocturne/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/nocturne/board.c')
-rw-r--r--board/nocturne/board.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index 021bf29d6e..39a7913f56 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -405,6 +405,15 @@ static void board_init(void)
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
+int board_is_i2c_port_powered(int port)
+{
+ if (port != I2C_PORT_ALS_GYRO)
+ return 1;
+
+ /* The sensors are not powered in anything lower than S5. */
+ return chipset_in_state(CHIPSET_STATE_ANY_OFF) ? 0 : 1;
+}
+
static void board_lid_change(void)
{
/* This is done in hardware on old revisions. */