Files
OpenCellular/board
Duncan Laurie c4fe1efc2c eve: Enable trackpad wake from Deep S3
In order to support waking from Deep S3 the trackpad interrupt
is routed to the EC.

The EC needs to enable this interrupt when going into S3, and
disable it otherwise.

It also needs to filter events and only wake the system when it
is not in tablet mode.

This is accomplished with the following rules:

1) Enable trackpad wake in S0->S3 transition, if !tablet_mode
2) Disable trackpad wake in S3->S5 transition
3) Disable trackpad wake in S3->S0 transition
4) Disable trackpad wake when entering tablet mode in S3
5) Enable trackpad wake when lid angle is <180 degrees and in S3

And finally a check in the trackpad interrupt itself to ensure that
it only sends the wake event if not in tablet mode.

The function to enable or disable trackpad wake uses a static variable
to keep track of the enable state because when enabling the GPIO for
wake it first clears pending events and if multiple transitions are
happening (suspending, plus lid angle rotation) this can get called
multiple times in quick succession.

Currently a placeholder KEY_PRESSED event is used to wake the AP
since we do not have device specific events.  Fixing this behavior
is tracked in b/36024430.

BUG=b:35587072
BRANCH=none
TEST=manual testing on eve P1b:
1) ensure that trackpad wake in clamshell mode works
2) ensure that trackpad wake in tablet mode does not waork
3) ensure that if in S3 during transition to or from tablet
mode the wake event is enabled appropriately

Change-Id: Ib2020b5010bdde396a3b05243894431b67edb503
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/450954
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
2017-03-16 18:06:59 -07:00
..
2017-03-16 11:25:50 -07:00
2017-03-16 04:17:32 -07:00
2017-03-16 11:25:50 -07:00
2017-03-16 11:25:50 -07:00
2017-01-26 18:43:52 -08:00
2017-02-14 17:28:15 -08:00
2017-03-16 11:25:50 -07:00
2017-03-10 15:11:56 -08:00
2017-03-16 11:25:50 -07:00
2016-05-04 16:15:02 -07:00
2014-04-02 19:58:53 +00:00