aboutsummaryrefslogtreecommitdiff
path: root/src/ec/google/wilco/chip.c
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2018-10-15 13:39:35 -0700
committerDuncan Laurie <dlaurie@chromium.org>2018-10-31 18:30:12 +0000
commit3fbe1949b1bed2dfc58d92b01368b308ebacef04 (patch)
tree26efce327422adc85b841b01d3c6fe9111b45ba7 /src/ec/google/wilco/chip.c
parentd978174d1dec9a4afba0510933eb34aee63355d5 (diff)
ec/google/wilco: Save and restore PS/2 data for S3
Send a command to the EC on the way into S3 suspend state telling it to save the PS/2 data, and on resume send it a command for restoring the PS/2 data that was previously saved. Change-Id: Ic4b5d6d2656dbb1c476b9211b0d60c71b0cd7b32 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/29120 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec/google/wilco/chip.c')
-rw-r--r--src/ec/google/wilco/chip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c
index 9a200bd720..929d1cc312 100644
--- a/src/ec/google/wilco/chip.c
+++ b/src/ec/google/wilco/chip.c
@@ -44,6 +44,12 @@ static void wilco_ec_post_video_init(void *unused)
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT,
wilco_ec_post_video_init, NULL);
+static void wilco_ec_resume(void *unused)
+{
+ wilco_ec_send_noargs(KB_RESTORE);
+}
+BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, wilco_ec_resume, NULL);
+
static void wilco_ec_init(struct device *dev)
{
if (!dev->enabled)