summaryrefslogtreecommitdiff
path: root/common/acpi.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2018-07-10 18:23:52 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-11 12:13:07 -0700
commit7729665d73469bab4975ab04c0f20fd62271004b (patch)
tree7eb5aa406fea2e135ccadf1a0f04f3b76ca164f4 /common/acpi.c
parentdf497304d9536063094f000e49b4b03f7e6cc02e (diff)
downloadchrome-ec-7729665d73469bab4975ab04c0f20fd62271004b.tar.gz
acpi: Return 0 for tablet mode if EC has no device orientation
This change returns 0 for EC_ACPI_MEM_DEVICE_ORIENTATION if CONFIG_DPTF_DEVICE_ORIENTATION is not selected. This ensures that EC returns 0 for tablet mode since it does not know anything about device orientation. Returning 0xff can result in AP thinking that tablet mode is enabled since bit 0 is set indicating tablet mode. BUG=b:111264961 BRANCH=None TEST=Verified that on yorp input devices are not inhibited anymore with TBMC device enabled in coreboot. Change-Id: I69ec047813bf456e6ac81b1e1b10cd18b23250e4 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1132611 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common/acpi.c')
-rw-r--r--common/acpi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/acpi.c b/common/acpi.c
index b17393cbcf..de6b927747 100644
--- a/common/acpi.c
+++ b/common/acpi.c
@@ -177,11 +177,13 @@ int acpi_ap_to_ec(int is_cmd, uint8_t value, uint8_t *resultptr)
break;
#endif
-#ifdef CONFIG_DPTF_DEVICE_ORIENTATION
case EC_ACPI_MEM_DEVICE_ORIENTATION:
+#ifdef CONFIG_DPTF_DEVICE_ORIENTATION
result = tablet_get_mode();
- break;
+#else
+ result = 0;
#endif
+ break;
case EC_ACPI_MEM_DEVICE_FEATURES0:
case EC_ACPI_MEM_DEVICE_FEATURES1: