diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-03-14 09:27:31 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-03-25 22:25:58 +0000 |
commit | 311abbd8896a927b7c4a4b2a226060a5ed64b044 (patch) | |
tree | 6022002aa844376f925a0c4eaa3748dee40046e9 /test | |
parent | b0b57a581e8ed3e818a195f7d6f9695ed90287ee (diff) | |
download | chrome-ec-311abbd8896a927b7c4a4b2a226060a5ed64b044.tar.gz |
rambi: glimmer: Disable key scanning in suspend when lid is open
Added ability to disable the keyboard to wake from suspend when the lid
is outside a certain angle range. This has been added to glimmer by
defining CONFIG_LID_ANGLE_KEY_SCAN in its board.h.
Also modified the lid angle calculation to include a reliability
flag which can be used to tell when the hinge aligns too closely
with gravity and the lid angle value is unreliable.
BUG=none
BRANCH=rambi
TEST=Tested on a glimmer:
In S3, verified that when the lid is open past ~180 deg, the keyboard
does not wake the machine. Also verified that if you align hinge with
gravity, the keyboard enabled/disabled status remains the same (since
we can't actually trust the lid angle value).
Change-Id: If1a1592d259902d38941936961854b81b3a75b95
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/190061
Diffstat (limited to 'test')
-rw-r--r-- | test/motion_sense.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/motion_sense.c b/test/motion_sense.c index 1a5d808044..c332f962c5 100644 --- a/test/motion_sense.c +++ b/test/motion_sense.c @@ -70,15 +70,15 @@ static int test_lid_angle(void) TEST_ASSERT(motion_get_lid_angle() == -135); /* - * Align base with hinge and make sure it returns 0 for angle. In this - * test it doesn't matter what the lid acceleration vector is. + * Align base with hinge and make sure it returns unreliable for angle. + * In this test it doesn't matter what the lid acceleration vector is. */ mock_x_acc[ACCEL_BASE] = 0; mock_y_acc[ACCEL_BASE] = 1000; mock_z_acc[ACCEL_BASE] = 0; task_wake(TASK_ID_MOTIONSENSE); msleep(5); - TEST_ASSERT(motion_get_lid_angle() == 0); + TEST_ASSERT(motion_get_lid_angle() == LID_ANGLE_UNRELIABLE); /* * Use all three axes and set lid to negative base and make sure |