From 95ed011a59c10eacfd83d293eb62badfd7feba6a Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Wed, 14 Sep 2016 15:30:23 -0700 Subject: [PATCH] cr50: make device state detect level triggered The interrupts on all of the gpios detecting if the device is on were edge triggered. If the rising edge happened in between when the gpio level was read and when the interrupt was enabled, then the device state could be falsely detected as off for a short period of time. This change changes them to GPIO_INT_HIGH. BUG=none BRANCH=none TEST=buildall Change-Id: I9aa3cff14047cf4f6473c32f2cdc4724afca3414 Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/385164 Reviewed-by: Bill Richardson --- board/cr50/gpio.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/board/cr50/gpio.inc b/board/cr50/gpio.inc index 780ec633e7..86c82c8aca 100644 --- a/board/cr50/gpio.inc +++ b/board/cr50/gpio.inc @@ -13,9 +13,9 @@ * so we attach two internal GPIOs to the same pad. */ GPIO_INT(SYS_RST_L_IN, PIN(1, 0), GPIO_INT_FALLING, sys_rst_asserted) -GPIO_INT(DETECT_AP, PIN(1, 1), GPIO_INT_RISING, device_state_on) -GPIO_INT(DETECT_EC, PIN(1, 2), GPIO_INT_RISING, device_state_on) -GPIO_INT(DETECT_SERVO, PIN(1, 3), GPIO_INT_RISING | GPIO_PULL_DOWN, +GPIO_INT(DETECT_AP, PIN(1, 1), GPIO_INT_HIGH, device_state_on) +GPIO_INT(DETECT_EC, PIN(1, 2), GPIO_INT_HIGH, device_state_on) +GPIO_INT(DETECT_SERVO, PIN(1, 3), GPIO_INT_HIGH | GPIO_PULL_DOWN, device_state_on) /* Pull this low to interrupt the AP */