summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-05-03 09:59:05 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-05-04 03:17:49 -0700
commitfd12ea66de5374065983a1ba1a8f698e300020b6 (patch)
tree48d6e4124ef05e1a0f75e50671bf658a2b6b51f3
parent96840904c1e25a5b04e1e796cf286adfe4e6beeb (diff)
downloadchrome-ec-fd12ea66de5374065983a1ba1a8f698e300020b6.tar.gz
arcada_ish: hook up lid open gpio interrupt
Hook up lid open interrupt correctly for arcada. This also ensures that we ignore lid angle when the lid is closed because lid angle can report 360 degrees and falsely enter tablet mode. BRANCH=none BUG=b:131785573 TEST=lid open/closed is reported correctly on console with this change. This also improves the tablet mode calculation, i.e. we do not go into tablet mode when the lid is closed. Change-Id: Idece81f3b03575941a22ab09485de7c3e7f85a8f Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1594110 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--board/arcada_ish/board.c1
-rw-r--r--board/arcada_ish/gpio.inc2
2 files changed, 2 insertions, 1 deletions
diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c
index 0693548be1..09c7d7ecb1 100644
--- a/board/arcada_ish/board.c
+++ b/board/arcada_ish/board.c
@@ -13,6 +13,7 @@
#include "hooks.h"
#include "host_command.h"
#include "i2c.h"
+#include "lid_switch.h"
#include "motion_sense.h"
#include "power.h"
#include "tablet_mode.h"
diff --git a/board/arcada_ish/gpio.inc b/board/arcada_ish/gpio.inc
index 60c8e959ae..7660d2c9ff 100644
--- a/board/arcada_ish/gpio.inc
+++ b/board/arcada_ish/gpio.inc
@@ -6,9 +6,9 @@
*/
GPIO_INT(ACCEL_GYRO_INT_L, PIN(0), GPIO_INT_FALLING | GPIO_SEL_1P8V, lsm6dsm_interrupt)
+GPIO_INT(LID_OPEN, PIN(5), GPIO_INT_BOTH, lid_interrupt) /* LID_CL_NB_L */
GPIO(NB_MODE_L, PIN(4), GPIO_OUT_LOW)
-GPIO(LID_OPEN, PIN(5), GPIO_INPUT) /* LID_CL_NB_L */
GPIO(LID_CL_TAB_L, PIN(6), GPIO_INPUT)
/*