summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-06-03 15:26:59 -0600
committerCommit Bot <commit-bot@chromium.org>2019-06-06 14:43:52 +0000
commit219717c5fa78ca92e411c7ed27b7d6a29dcdd6e4 (patch)
tree8ac9524245c6f478bcc56d688f8c6ea9acf02063
parentadfc20841f18f3ad52fd90d193785890ea86a7fc (diff)
downloadchrome-ec-219717c5fa78ca92e411c7ed27b7d6a29dcdd6e4.tar.gz
arcada: use lid switch instead of gpio
Use the debounced lid switch state for lid close instead of the raw gpio. BRANCH=none BUG=b:126861777 TEST=tablet mode state is cleaner around 0 degrees Change-Id: I46d7e2ed7fa0af7f276662e5136613caaed539f7 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1644211 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--board/arcada_ish/board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c
index 725248a1b6..8d1566723e 100644
--- a/board/arcada_ish/board.c
+++ b/board/arcada_ish/board.c
@@ -155,7 +155,7 @@ int board_sensor_at_360(void)
* closed at 0 degrees. Ignore the hall sensor when the lid close is
* also active.
*/
- return gpio_get_level(GPIO_LID_OPEN) &&
+ return lid_is_open() &&
!gpio_get_level(HALL_SENSOR_GPIO_L);
}