From 2911e38022a950d9f0e85ed7480829bf21d34a1f Mon Sep 17 00:00:00 2001 From: li feng Date: Thu, 2 Jul 2015 13:29:10 -0700 Subject: 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 Signed-off-by: Shamile Khan Reviewed-on: https://chromium-review.googlesource.com/287341 Reviewed-by: Shawn N --- include/lid_angle.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'include/lid_angle.h') 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 */ -- cgit v1.2.1