summaryrefslogtreecommitdiff
path: root/include/motion_lid.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2016-09-08 10:49:49 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-09 12:33:19 -0700
commit8a3b9988683e8d2d42837daede1fbd3f220c19b5 (patch)
treefc72ea2e9eeb85d89d2c61824edea125ef509e20 /include/motion_lid.h
parent2b82ad78004e8ce37272743792acdb347a5a1001 (diff)
downloadchrome-ec-8a3b9988683e8d2d42837daede1fbd3f220c19b5.tar.gz
common: motion_lid: Add tablet mode detection using lid angle.
Using the lid angle, detect if we are in tablet mode or not. We are in tablet mode when the lid angle is large enough: tablet_mode: 1 | +-----<----+---------- | \/ /\ | | | 0 |------------------------>----+ +------------------+----------+----------+ lid angle 0 240 300 360 BRANCH=kevin BUG=chrome-os-partner:55702,b:27849483 TEST=Check on Kevin event are sent on tablet mode transition. Change-Id: Id9935ce4dd717e2c20fa6c9520defb504a1760d9 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/383073 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/motion_lid.h')
-rw-r--r--include/motion_lid.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/motion_lid.h b/include/motion_lid.h
index 155c7735c9..405d5e5e5d 100644
--- a/include/motion_lid.h
+++ b/include/motion_lid.h
@@ -46,6 +46,12 @@ int host_cmd_motion_lid(struct host_cmd_handler_args *args);
void motion_lid_calc(void);
+#ifdef CONFIG_LID_ANGLE_TABLET_MODE
+int motion_lid_in_tablet_mode(void);
+#else
+static inline int motion_lid_in_tablet_mode(void) { return 0; }
+#endif
+
#endif /* __CROS_EC_MOTION_LID_H */