summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/jacuzzi/board.c13
-rw-r--r--board/jacuzzi/board.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c
index ad48e8cc95..9f70ed97fd 100644
--- a/board/jacuzzi/board.c
+++ b/board/jacuzzi/board.c
@@ -559,3 +559,16 @@ int board_get_battery_i2c(void)
{
return board_get_version() >= 1 ? 2 : 1;
}
+
+/* Enable or disable input devices, based on chipset state and tablet mode */
+#ifndef TEST_BUILD
+void lid_angle_peripheral_enable(int enable)
+{
+ /* If the lid is in 360 position, ignore the lid angle,
+ * which might be faulty. Disable keyboard.
+ */
+ if (tablet_get_mode() || chipset_in_state(CHIPSET_STATE_ANY_OFF))
+ enable = 0;
+ keyboard_scan_enable(enable, KB_SCAN_DISABLE_LID_ANGLE);
+}
+#endif
diff --git a/board/jacuzzi/board.h b/board/jacuzzi/board.h
index 0f9ef32bfc..28f10084e4 100644
--- a/board/jacuzzi/board.h
+++ b/board/jacuzzi/board.h
@@ -68,6 +68,7 @@
#define CONFIG_CMD_ACCEL_INFO
#define CONFIG_LID_ANGLE
+#define CONFIG_LID_ANGLE_UPDATE
#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL