diff options
author | Jett Rink <jettrink@chromium.org> | 2019-05-03 09:59:05 -0600 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2019-05-03 17:10:32 +0000 |
commit | a50e25f1c7e47b8138bc39da4753689857675e69 (patch) | |
tree | 244ab27f71077c782f197e099216030f72642391 | |
parent | 72a1ddde8c66085c3baecd7ea4888b116ee93772 (diff) | |
download | chrome-ec-a50e25f1c7e47b8138bc39da4753689857675e69.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/c/chromiumos/platform/ec/+/1594952
-rw-r--r-- | board/arcada_ish/board.c | 1 | ||||
-rw-r--r-- | board/arcada_ish/gpio.inc | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c index 22533e0d8c..5147d261d4 100644 --- a/board/arcada_ish/board.c +++ b/board/arcada_ish/board.c @@ -12,6 +12,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) /* |