summaryrefslogtreecommitdiff
path: root/board/eve
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2017-07-20 16:56:36 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-30 10:46:39 +0000
commit5e6b8db7fe0585be19009dc028b886a15d9fe1b8 (patch)
tree9d04dffa1b0dc5756d58ede69abb848914e28775 /board/eve
parent9283f97182e8a104e3c67e90fc6e296e8b9c9e1b (diff)
downloadchrome-ec-5e6b8db7fe0585be19009dc028b886a15d9fe1b8.tar.gz
eve: Leave keyboard enabled in magic keyboard mode.
When the lid angle is close to 360 degree while in magic keyboard mode, we may receive call to [re-]enable peripheral with lid_angle_peripheral_enable(1). However given we test for tablet_mode, we would shut them off. Only sut of while suspended. BUG=b:63904951 BRANCH=eve TEST=Without this change no keyboard events are recoreded by evetest while in magic mode (lid against base, screen luminosity off, external display connected). Change-Id: I1cda8b2de2f2ba89b3bb2007e57187dd48f19fde Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/581607 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2320246 Commit-Queue: Patryk Duda <pdk@semihalf.com> Tested-by: Patryk Duda <pdk@semihalf.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/eve')
-rw-r--r--board/eve/board.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/board/eve/board.c b/board/eve/board.c
index 72fa2c8416..5e9e3e700e 100644
--- a/board/eve/board.c
+++ b/board/eve/board.c
@@ -646,10 +646,11 @@ static void enable_input_devices(void)
void lid_angle_peripheral_enable(int enable)
{
/*
- * If the lid is in 360 position, ignore the lid angle,
+ * If suspended and the lid is in 360 position, ignore the lid angle,
* which might be faulty. Disable keyboard and trackpad wake.
*/
- if (tablet_get_mode() || chipset_in_state(CHIPSET_STATE_ANY_OFF))
+ if (chipset_in_state(CHIPSET_STATE_ANY_OFF) ||
+ (tablet_get_mode() && chipset_in_state(CHIPSET_STATE_SUSPEND)))
enable = 0;
keyboard_scan_enable(enable, KB_SCAN_DISABLE_LID_ANGLE);