summaryrefslogtreecommitdiff
path: root/board/fennel/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/fennel/board.c')
-rw-r--r--board/fennel/board.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/fennel/board.c b/board/fennel/board.c
index 799255712d..6a3980d6a8 100644
--- a/board/fennel/board.c
+++ b/board/fennel/board.c
@@ -544,3 +544,16 @@ DECLARE_HOST_COMMAND(EC_CMD_PWM_GET_DUTY,
host_command_pwm_get_duty,
EC_VER_MASK(0));
#endif
+
+/* 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