summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2018-10-19 15:34:33 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-30 01:04:57 -0700
commit09a5e0a9398a1ca9e953969d5c10d3b60cda8eac (patch)
tree609fd9dfbc271cf71513e52df5d4473749e87e70 /include
parent23a82485cfd2e893fa147dd0fd877ff783316c8f (diff)
downloadchrome-ec-09a5e0a9398a1ca9e953969d5c10d3b60cda8eac.tar.gz
dptf: Get rid of CONFIG_DPTF_DEVICE_ORIENTATION
CONFIG_DPTF_DEVICE_ORIENTATION was added to indicate mode change to the host to allow it to read the tablet mode flag from shared EC memory and select the right DPTF table to load (if supported). However, this config seems unnecessary because of the following reasons: 1. Host sets SCI mask to indicate to the EC which events it wants to process. Thus, even if the EC sets mode change flag, it will not be notified to the host unless it supports mode change event. 2. Additionally, if host supports mode change event, but does not support multiple DPTF tables, then EC ACPI code takes care of ensuring that there is a thermal event handler present to reload tables. 3. CONFIG_DPTF_DEVICE_ORIENTATION was defined for almost all new x86 boards. BUG=b:117844490 BRANCH=None TEST=make -j buildall Change-Id: Ic4097ae047e2d559673a321da4df86514f902993 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1292359 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h3
-rw-r--r--include/tablet_mode.h8
2 files changed, 8 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h
index 53be906a07..b175375dae 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1378,9 +1378,6 @@
*/
#undef CONFIG_FAN_UPDATE_PERIOD
-/* Send event when mode change, host read acpi memory and select DPTF table */
-#undef CONFIG_DPTF_DEVICE_ORIENTATION
-
/*****************************************************************************/
/* Flash configuration */
diff --git a/include/tablet_mode.h b/include/tablet_mode.h
index 2568ba2e86..34616a74a3 100644
--- a/include/tablet_mode.h
+++ b/include/tablet_mode.h
@@ -5,6 +5,8 @@
/* Header for tablet_mode.c */
+#ifdef CONFIG_TABLET_MODE
+
/* Return 1 if in tablet mode, 0 otherwise */
int tablet_get_mode(void);
void tablet_set_mode(int mode);
@@ -23,3 +25,9 @@ void tablet_mode_isr(enum gpio_signal signal);
* useful for clamshell devices.
*/
void tablet_disable_switch(void);
+
+#else
+
+static inline int tablet_get_mode(void) { return 0; }
+
+#endif