summaryrefslogtreecommitdiff
path: root/common/acpi.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2016-10-21 16:35:12 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-11-08 17:11:28 -0800
commit9b67ffcd527c6244a9f1946072f40e8e9fd9b940 (patch)
tree34b363bfdbe8a74123724b7cf6cd44a417e91376 /common/acpi.c
parent8bb2d9fbf0d0a8d6810a9f08dd0437cfa3745db2 (diff)
downloadchrome-ec-9b67ffcd527c6244a9f1946072f40e8e9fd9b940.tar.gz
common: Add tablet_mode API
Simple API to set/get the tablet mode. It can be set via lid angle calculation or if a board has a dedicated HAL sensor/GPIO. Merged from glados branch, add MKBP switch support. BUG=chromium:606718 BRANCH=gru TEST=Check with Cave that both mode works. Reviewed-on: https://chromium-review.googlesource.com/402089 Reviewed-by: Shawn N <shawnn@chromium.org> (cherry picked from commit c940f36ceabcf2425284001298f03ebdb4c3079e) Change-Id: I2ee5130f3e0a1307ec3ea543f7a32d66bc32b31d Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/404915 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/acpi.c')
-rw-r--r--common/acpi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/acpi.c b/common/acpi.c
index f73dfd2db5..d9815100e1 100644
--- a/common/acpi.c
+++ b/common/acpi.c
@@ -11,6 +11,7 @@
#include "host_command.h"
#include "lpc.h"
#include "ec_commands.h"
+#include "tablet_mode.h"
#include "pwm.h"
#include "timer.h"
#include "util.h"
@@ -170,7 +171,7 @@ int acpi_ap_to_ec(int is_cmd, uint8_t value, uint8_t *resultptr)
#ifdef CONFIG_DPTF_DEVICE_ORIENTATION
case EC_ACPI_MEM_DEVICE_ORIENTATION:
- result = board_get_device_orientation();
+ result = tablet_get_mode();
break;
#endif