summaryrefslogtreecommitdiff
path: root/board
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
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')
-rw-r--r--board/damu/board.c1
-rw-r--r--board/damu/board.h4
-rw-r--r--board/damu/gpio.inc3
-rw-r--r--board/jacuzzi/board.c1
-rw-r--r--board/jacuzzi/board.h3
-rw-r--r--board/jacuzzi/gpio.inc3
-rw-r--r--board/kappa/board.c1
-rw-r--r--board/kappa/board.h3
-rw-r--r--board/kappa/gpio.inc3
9 files changed, 19 insertions, 3 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)
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c
index 9029fa764b..0292fa1459 100644
--- a/board/jacuzzi/board.c
+++ b/board/jacuzzi/board.c
@@ -36,6 +36,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/jacuzzi/board.h b/board/jacuzzi/board.h
index a3ca10e276..74372f2947 100644
--- a/board/jacuzzi/board.h
+++ b/board/jacuzzi/board.h
@@ -99,6 +99,9 @@
#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
diff --git a/board/jacuzzi/gpio.inc b/board/jacuzzi/gpio.inc
index 61a9afba89..c3c71daecd 100644
--- a/board/jacuzzi/gpio.inc
+++ b/board/jacuzzi/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)
diff --git a/board/kappa/board.c b/board/kappa/board.c
index fcf1707528..be01e2c177 100644
--- a/board/kappa/board.c
+++ b/board/kappa/board.c
@@ -36,6 +36,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/kappa/board.h b/board/kappa/board.h
index 8687c7a89b..99da5f17dd 100644
--- a/board/kappa/board.h
+++ b/board/kappa/board.h
@@ -90,6 +90,9 @@
#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
diff --git a/board/kappa/gpio.inc b/board/kappa/gpio.inc
index f739634b71..2145cbf1c0 100644
--- a/board/kappa/gpio.inc
+++ b/board/kappa/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)