summaryrefslogtreecommitdiff
path: root/board/damu
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2020-02-17 16:18:25 +0800
committerCommit Bot <commit-bot@chromium.org>2020-02-18 08:44:46 +0000
commit4b8d829d6ab0131716ec8972847479056cd3fbba (patch)
treebbc89a8ed938ede9a1864ed85c96b7ea6814b284 /board/damu
parentc2797a55a58678e3118aa0b95431c78f02b1ec3d (diff)
downloadchrome-ec-4b8d829d6ab0131716ec8972847479056cd3fbba.tar.gz
jacuzzi: enable tablet mode in EC
BUG=b:149666087 TEST="tablet mode enabled/disabled" in EC console TEST=see virtual keyboard when flip to 360 degree BRANCH=kukui Change-Id: I44af9f742775aaf71bbf792a70af3176f73bda52 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2059861 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/damu')
-rw-r--r--board/damu/board.c1
-rw-r--r--board/damu/board.h4
-rw-r--r--board/damu/gpio.inc3
3 files changed, 7 insertions, 1 deletions
diff --git a/board/damu/board.c b/board/damu/board.c
index 0fd5487f95..87e78c5043 100644
--- a/board/damu/board.c
+++ b/board/damu/board.c
@@ -37,6 +37,7 @@
#include "registers.h"
#include "spi.h"
#include "system.h"
+#include "tablet_mode.h"
#include "task.h"
#include "tcpm.h"
#include "timer.h"
diff --git a/board/damu/board.h b/board/damu/board.h
index 8e45ebc3e6..c23b2cf784 100644
--- a/board/damu/board.h
+++ b/board/damu/board.h
@@ -89,6 +89,10 @@
#define CONFIG_KEYBOARD_BOARD_CONFIG
#define CONFIG_KEYBOARD_COL2_INVERTED
+#define CONFIG_GMR_TABLET_MODE
+#define GMR_TABLET_MODE_GPIO_L GPIO_TABLET_MODE_L
+#define CONFIG_TABLET_MODE_SWITCH
+
#define PD_OPERATING_POWER_MW 30000
#ifndef __ASSEMBLER__
diff --git a/board/damu/gpio.inc b/board/damu/gpio.inc
index 90f6edd908..840baee37d 100644
--- a/board/damu/gpio.inc
+++ b/board/damu/gpio.inc
@@ -37,10 +37,11 @@ GPIO_INT(IT8801_SMB_INT, PIN(A, 8), GPIO_INT_FALLING | GPIO_PULL_UP,
io_expander_it8801_interrupt) /* KB_INT_ODL */
GPIO_INT(AP_EC_WATCHDOG_L, PIN(D, 2), GPIO_INT_FALLING,
chipset_watchdog_interrupt)
+GPIO_INT(TABLET_MODE_L, PIN(B, 11), GPIO_INT_BOTH,
+ gmr_tablet_switch_isr)
/* Unimplemented interrupts */
GPIO(ALS_RGB_INT_ODL, PIN(C, 10), GPIO_INPUT)
-GPIO(TABLET_MODE_L, PIN(B, 11), GPIO_INPUT)
/* Reset pins */
GPIO(AP_SYS_RST_L, PIN(C, 11), GPIO_OUT_LOW)