diff options
author | li feng <li1.feng@intel.com> | 2015-07-02 13:29:10 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-10 20:42:18 +0000 |
commit | 2911e38022a950d9f0e85ed7480829bf21d34a1f (patch) | |
tree | 3a5997761bcee8f6443069d4b49cd08c549d386c /include/lid_angle.h | |
parent | 68b2809ee8f611d089f6d946dba10bb1b6d5c507 (diff) | |
download | chrome-ec-2911e38022a950d9f0e85ed7480829bf21d34a1f.tar.gz |
Cyan: Added Clamshell/Tablet mode support
Enabled lid angle calculation. Clamshell/Tablet mode is decided by lid angle.
Accelerometers are set to be active in S3 also.
Trackpad is enabled/disabled by GPIO TP_INT_DISABLE.
Keyboard scan and trackpad are enabled in clamshell mode and disabled in
tablet mode.
Removed enable_keyboard() since keyboard is enabled in clamshell S0 and
S3.
BUG=chrome-os-partner:41353
TEST=Verify in clamshell mode, system can be waken up from S3 by keyboard/trackpad;
And not tablet mode.
BRANCH=None
Change-Id: Ic5fb5a562e8426288eae2fb9815a213fe5033955
Signed-off-by: li feng <li1.feng@intel.com>
Signed-off-by: Shamile Khan <shamile.khan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/287341
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/lid_angle.h')
-rw-r--r-- | include/lid_angle.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/lid_angle.h b/include/lid_angle.h index e45a5683a4..3b99a145c6 100644 --- a/include/lid_angle.h +++ b/include/lid_angle.h @@ -10,19 +10,26 @@ /** * Update the lid angle module with the most recent lid angle calculation. Then - * use the lid angle history to enable/disable keyboard scanning when chipset - * is suspended. + * use the lid angle history to enable/disable peripheral devices, keyboard + * scanning and track pad interrupt, etc. * - * @lid_ang Lid angle. + * @param lid_ang Lid angle. */ -void lidangle_keyscan_update(int lid_ang); +void lid_angle_update(int lid_ang); /** * Getter and setter methods for the keyboard wake angle. In S3, when the - * lid angle is greater than this value, the keyboard is disabled, and when - * the lid angle is smaller than this value, the keyboard is enabled. + * lid angle is greater than this value, the peripheral devices are disabled, + * and when the lid angle is smaller than this value, they are enabled. */ -int lid_angle_get_kb_wake_angle(void); -void lid_angle_set_kb_wake_angle(int ang); +int lid_angle_get_wake_angle(void); +void lid_angle_set_wake_angle(int ang); + +/** + * Board level callback for lid angle changes. + * + * @param enable Flag that enables or disables peripherals. + */ +void lid_angle_peripheral_enable(int enable); #endif /* __CROS_EC_LID_ANGLE_H */ |