summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-09-04 13:57:52 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-09-04 21:03:38 -0700
commit23b3b88f821105125bc7fb1d0607e0d474fa4d1a (patch)
tree879fd84d92466ff124fd5ec9970fc8f2e60011e9
parent21bb2cbbe9ba18ae7a2065caff9836bb2d6558e7 (diff)
downloadchrome-ec-23b3b88f821105125bc7fb1d0607e0d474fa4d1a.tar.gz
bip: add tablet mode for consistency
Hardware has supported tablet mode for a while, add firmware support for tablet mode. BRANCH=none BUG=none TEST=on bip, can use magnet to enter tablet mode. Change-Id: I97202f1638732c9dcae641d3cf834a8d08b4a134 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1204698 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org>
-rw-r--r--board/bip/board.c1
-rw-r--r--board/bip/board.h4
-rw-r--r--board/bip/gpio.inc3
3 files changed, 8 insertions, 0 deletions
diff --git a/board/bip/board.c b/board/bip/board.c
index 8095b7db03..1222cd00ba 100644
--- a/board/bip/board.c
+++ b/board/bip/board.c
@@ -27,6 +27,7 @@
#include "switch.h"
#include "system.h"
#include "tcpci.h"
+#include "tablet_mode.h"
#include "temp_sensor.h"
#include "thermistor.h"
#include "uart.h"
diff --git a/board/bip/board.h b/board/bip/board.h
index dee428fe5c..8ff7239808 100644
--- a/board/bip/board.h
+++ b/board/bip/board.h
@@ -26,6 +26,10 @@
#define CONFIG_DPTF
+#define CONFIG_TABLET_MODE
+#define CONFIG_TABLET_SWITCH
+#define TABLET_MODE_GPIO_L GPIO_TABLET_MODE_L
+
/* Hardware for proto bip does not support ec keyboard backlight control. */
#undef CONFIG_PWM
#undef CONFIG_PWM_KBLIGHT
diff --git a/board/bip/gpio.inc b/board/bip/gpio.inc
index f9cd44ca74..2abc3d10be 100644
--- a/board/bip/gpio.inc
+++ b/board/bip/gpio.inc
@@ -37,6 +37,9 @@ GPIO_INT(AC_PRESENT, PIN(A, 7), GPIO_INT_BOTH, extpower_interrupt) /* ACOK_OD
GPIO_INT(ESPI_RESET_L, PIN(D, 2), GPIO_INT_FALLING | GPIO_SEL_1P8V, espi_reset_pin_asserted_interrupt) /* eSPI_reset# */
#endif
+/* Other interrupts */
+GPIO_INT(TABLET_MODE_L, PIN(H, 4), GPIO_INT_BOTH, tablet_mode_isr)
+
GPIO(PCH_PLTRST_L, PIN(E, 3), GPIO_INPUT) /* PLT_RST_L: Platform Reset from SoC */
GPIO(SYS_RESET_L, PIN(B, 6), GPIO_ODR_HIGH) /* SYS_RST_ODL */
/*