Files
OpenCellular/include/lid_angle.h
li feng 2911e38022 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>
2015-08-10 20:42:18 +00:00

36 lines
1.0 KiB
C

/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Lid angle module for Chrome EC */
#ifndef __CROS_EC_LID_ANGLE_H
#define __CROS_EC_LID_ANGLE_H
/**
* Update the lid angle module with the most recent lid angle calculation. Then
* use the lid angle history to enable/disable peripheral devices, keyboard
* scanning and track pad interrupt, etc.
*
* @param lid_ang Lid angle.
*/
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 peripheral devices are disabled,
* and when the lid angle is smaller than this value, they are enabled.
*/
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 */