summaryrefslogtreecommitdiff
path: root/board/woomax
diff options
context:
space:
mode:
authorMichael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>2020-07-09 16:44:09 +0800
committerCommit Bot <commit-bot@chromium.org>2020-07-10 04:13:35 +0000
commit985bc9bd7ce80a6027ea7af3ba4a6b411843e338 (patch)
tree49c39982a5baa59bd6e5b01792f46b80a27e8afb /board/woomax
parent625ecdcdef9064ad20e369c46eb83bed7d82575e (diff)
downloadchrome-ec-985bc9bd7ce80a6027ea7af3ba4a6b411843e338.tar.gz
woomax: Enable GMR sensor
Enable GMR sensor. BUG=b:160834197 BRANCH=master TEST=manual Check TABLET_MODE_L pin status when gmr sensor triger. Signed-off-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: Ib12fd74947025fcdb92b8e257f291f5757b197f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2289471 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'board/woomax')
-rw-r--r--board/woomax/board.c1
-rw-r--r--board/woomax/board.h2
-rw-r--r--board/woomax/gpio.inc1
3 files changed, 4 insertions, 0 deletions
diff --git a/board/woomax/board.c b/board/woomax/board.c
index c29b528031..1128a07762 100644
--- a/board/woomax/board.c
+++ b/board/woomax/board.c
@@ -28,6 +28,7 @@
#include "pwm_chip.h"
#include "switch.h"
#include "system.h"
+#include "tablet_mode.h"
#include "task.h"
#include "temp_sensor.h"
#include "usb_charge.h"
diff --git a/board/woomax/board.h b/board/woomax/board.h
index 2a67604645..b654a1d732 100644
--- a/board/woomax/board.h
+++ b/board/woomax/board.h
@@ -33,6 +33,7 @@
#define CONFIG_LID_ANGLE_UPDATE
#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL
+#define CONFIG_GMR_TABLET_MODE
/* GPIO mapping from board specific name to EC common name. */
#define CONFIG_BATTERY_PRESENT_GPIO GPIO_EC_BATT_PRES_ODL
@@ -57,6 +58,7 @@
#define GPIO_VOLUME_UP_L GPIO_VOLUP_BTN_ODL
#define GPIO_WP_L GPIO_EC_WP_L
#define GPIO_PACKET_MODE_EN GPIO_EC_H1_PACKET_MODE
+#define GMR_TABLET_MODE_GPIO_L GPIO_TABLET_MODE_L
#ifndef __ASSEMBLER__
diff --git a/board/woomax/gpio.inc b/board/woomax/gpio.inc
index f877aaa1e0..3f2d4094c4 100644
--- a/board/woomax/gpio.inc
+++ b/board/woomax/gpio.inc
@@ -25,6 +25,7 @@ GPIO_INT(EC_WP_L, PIN(5, 0), GPIO_INT_BOTH, switch_interrupt)
GPIO_INT(VOLDN_BTN_ODL, PIN(A, 6), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt)
GPIO_INT(VOLUP_BTN_ODL, PIN(9, 5), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt)
GPIO_INT(6AXIS_INT_L, PIN(A, 0), GPIO_INT_FALLING | GPIO_PULL_UP, bmi160_interrupt)
+GPIO_INT(TABLET_MODE_L, PIN(4, 4), GPIO_INT_BOTH, gmr_tablet_switch_isr)
/* GPIO_INT_BOTH is required for PSL wake from hibernate, but we don't need an interrupt handler. */
GPIO(EC_RST_ODL, PIN(0, 2), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH)