summaryrefslogtreecommitdiff
path: root/common/keyboard_8042.c
diff options
context:
space:
mode:
authorJosie Nordrum <JosieNordrum@google.com>2020-09-24 17:08:41 -0600
committerCommit Bot <commit-bot@chromium.org>2020-10-07 01:19:54 +0000
commite69486efd7b71484646ba74bd7e4b39ee7b860ce (patch)
tree9d5f56603fd8343c884e411ac958adc30ca37cb0 /common/keyboard_8042.c
parent347e73f4ea4347e142bd942aa879eb1c729ad2c0 (diff)
downloadchrome-ec-e69486efd7b71484646ba74bd7e4b39ee7b860ce.tar.gz
Keyboard: Add AP wakeup to PS2 trackpoint interrupt
Wake up AP for PS2 interrupt using Device Event as trigger. AP must have device event wakeup mask enabled and board must select CONFIG_DEVICE_EVENT in EC. This device event is only triggered when the chipset is suspended to avoid triggering SCIs in S0. BUG=b:160345665 BRANCH=Zork TEST=Wake from S3 by trackpoint Signed-off-by: Josie Nordrum <josienordrum@google.com> Change-Id: Ia431525ee8f572922c8f9bfe613d44e83308d9f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2430288 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common/keyboard_8042.c')
-rw-r--r--common/keyboard_8042.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/keyboard_8042.c b/common/keyboard_8042.c
index b9e8335773..4e3a5b4b98 100644
--- a/common/keyboard_8042.c
+++ b/common/keyboard_8042.c
@@ -9,6 +9,7 @@
#include "button.h"
#include "common.h"
#include "console.h"
+#include "device_event.h"
#include "hooks.h"
#include "host_command.h"
#include "i8042_protocol.h"
@@ -957,6 +958,10 @@ static void send_aux_data_to_host_deferred(void)
{
uint8_t data;
+ if (IS_ENABLED(CONFIG_DEVICE_EVENT) &&
+ chipset_in_state(CHIPSET_STATE_ANY_SUSPEND))
+ device_set_single_event(EC_DEVICE_EVENT_TRACKPAD);
+
while (!queue_is_empty(&aux_to_host_queue)) {
queue_remove_unit(&aux_to_host_queue, &data);
if (aux_chan_enabled && IS_ENABLED(CONFIG_8042_AUX))