summaryrefslogtreecommitdiff
path: root/board/jacuzzi
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2021-03-10 14:43:09 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-10 10:35:15 +0000
commit814d973bcfbcb0987b6de893e9dd0fe2558c31b7 (patch)
tree6639840eb988bfa8c305d5e0b50799cc9c062a78 /board/jacuzzi
parent057bec4971fb1d1f2dee636b13364d99a614e888 (diff)
downloadchrome-ec-814d973bcfbcb0987b6de893e9dd0fe2558c31b7.tar.gz
Juniper: disable keyboard at tablet mode when in S3
BUG=b:182247795 TEST=keyboard/touchpad cannot wakeup DUT when S3+tablet. BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I29f5e9e24e90e75534d617f6fb87d29c5579e445 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2746940 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/jacuzzi')
-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