summaryrefslogtreecommitdiff
path: root/board/kukui/gpio.inc
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2019-05-10 19:22:51 +0800
committerCommit Bot <commit-bot@chromium.org>2019-06-20 09:38:53 +0000
commit3e31f7f3e8708dd9ab21ce215a0eaee4657ed85e (patch)
tree29bf06b16a4b15f10196d925c6da7e74ca373700 /board/kukui/gpio.inc
parent472a26a4bbb7fa67b782e9663a06b01a29468a79 (diff)
downloadchrome-ec-3e31f7f3e8708dd9ab21ce215a0eaee4657ed85e.tar.gz
krane: detect pogo charger in adc interrupt
1. Move the charging dock detection logic from POGO_VBUS_PRESENT interrupt to POGO_ADC_INT_L interrupt. (see issue below for more context). 2. Since the analog pin in STM32F0 can not trigger interrupt, the pin is now an input pin, and programmed as an analog pin only when need to read its value. BUG=b:132419493 TEST=Manually, verify that the value of EN_POGO_CHARGE_L, EN_USBC_CHARGE_L and EN_PP3300_POGO are correct when fake device attached. BRANCH=None Change-Id: Idd468f06516a614e07aa357ffe215846314a435b Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1604548 Reviewed-by: Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/kukui/gpio.inc')
-rw-r--r--board/kukui/gpio.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/board/kukui/gpio.inc b/board/kukui/gpio.inc
index cba7902172..f9ddacc6ec 100644
--- a/board/kukui/gpio.inc
+++ b/board/kukui/gpio.inc
@@ -43,10 +43,12 @@ GPIO_INT(HALL_INT_L, PIN(C, 5), GPIO_INT_BOTH,
lid_interrupt)
GPIO_INT(GAUGE_INT_ODL, PIN(C, 9), GPIO_INT_FALLING | GPIO_PULL_UP,
gauge_interrupt)
-GPIO_INT(POGO_ADC_INT_L, PIN(A, 6), GPIO_INT_BOTH | GPIO_ANALOG,
+GPIO_INT(POGO_ADC_INT_L, PIN(A, 6), GPIO_INT_BOTH,
pogo_adc_interrupt)
-GPIO_INT(POGO_VBUS_PRESENT, PIN(A, 14), GPIO_INT_BOTH,
- pogo_vbus_present)
+
+/* unused */
+GPIO(POGO_VBUS_PRESENT, PIN(A, 14), GPIO_INPUT)
+
/* Reset pins */
GPIO(AP_SYS_RST_L, PIN(C, 11), GPIO_OUT_LOW)