summaryrefslogtreecommitdiff
path: root/include/tablet_mode.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tablet_mode.h')
-rw-r--r--include/tablet_mode.h8
1 files changed, 8 insertions, 0 deletions
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