summaryrefslogtreecommitdiff
path: root/board/arcada_ish/board.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-05-06 10:33:11 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-05-28 21:11:21 -0700
commite11d78dcf4ca4ecfe6ceecad0b892fd4993cb67c (patch)
tree72a3ce27d0980e14d901b51f07d11f3e0082215a /board/arcada_ish/board.c
parent325d65d3b08903e7bd3c70d14875cc1dfbf1686d (diff)
downloadchrome-ec-e11d78dcf4ca4ecfe6ceecad0b892fd4993cb67c.tar.gz
arcada_ish: hook up 360 hall sensor to ISR
Ensure that 360-degree-hall sensor is hooked up to the tablet mode ISR, which should in turn ignore any weird lid angle calculations when the hall sensor is active (i.e. lid is at 360 degrees) BRANCH=R75 BUG=b:131785573 TEST=arcada does not have spurious edges on the NB_MODE# signal when the lid is all the way open in 360 degree mode. Cq-Depend: chrome-internal:1329664 Change-Id: I1756bd909e5ecba7caa4565376f98f6d0dad6b06 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1597190 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'board/arcada_ish/board.c')
-rw-r--r--board/arcada_ish/board.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c
index 8d3d13bb9c..725248a1b6 100644
--- a/board/arcada_ish/board.c
+++ b/board/arcada_ish/board.c
@@ -148,6 +148,17 @@ struct motion_sensor_t motion_sensors[] = {
const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
+int board_sensor_at_360(void)
+{
+ /*
+ * The 360 degree sensor is too sensitive and is active when the lid is
+ * closed at 0 degrees. Ignore the hall sensor when the lid close is
+ * also active.
+ */
+ return gpio_get_level(GPIO_LID_OPEN) &&
+ !gpio_get_level(HALL_SENSOR_GPIO_L);
+}
+
/* Initialize board. */
static void board_init(void)
{